Firebase Auth password update problem

Hi all, I have an issue using Firebase Auth API for updating the user's password in my app, hope someone can help me to fix it.
The app correctly works when creating the user's account, adding the nickname/photo url and deleting the user's account, but it is not able to update the user's password. :sob:
Here below you can find a screenshot of the block I made for this part, can someone help me to understand where I'm wrong, please?

Try like this ?

https://firebase.google.com/docs/reference/rest/auth#section-change-password

Why do I have to use dictionary's blocks?
I'm not using them for adding/modifying the nickname and the photo URL using the Firebase Auth API :thinking:

It is just another way of doing it. I also show the request headers...

What response are you getting back from firebase with your blocks ?

No responses in the users' list, but when I logout and try to login again the new password doesn't work but using the old one I'm able to login again...

You should be getting something back in the Web_PasswordUpdate.GotText event (responseContent).

That will help the diagnosis of the problem.

This is the response in the GotText event after clicking on the PasswordUpdate button

Whilst when I logout and try to login again now it doesn't work neither using the new password nor using the old one, and this is the response

Well that all looks OK.

Let me do a test on my Firebase, see what occurs...

Well, a quick test on my project changes the password and allows login with the new password, and rejects login with the old password.

so not sure where you problem is ?

How are you "logging out" ? There is no function in the REST API for this....

Also, you should not be getting an INVALID_ID_TOKEN error when trying to signin, you do not send an idToken to signin....

Logging out the app goes to the loginin/signup screen.
This is the process for the login, I save into theTyniDB the password (for checking the "old" password when updating it), the idToken and the uid (for other checks).

Is there something wrong here maybe? :thinking:

You might want to have a look here, as to how I tackled email verification....

but to test the password update, just temporarily remove the verification section

Same problem also removing the verification section.
I made a couple of test and it seems that, when trying to logging in after the password update, the idToken is not found by the dictionary block.

I'll try to change my login page basing on your example and verify if the password change works with this solution. :wink:

The best thing to do is to simplify, just use the blocks as I showed (that work for me) above. Test this, does it work for you? If yes, then you know it works and an issue exists further down in your code.

Here I am with an update! :slight_smile:
I started using the link you shared and it worked, then I added some checks/error messages in the login page and some other checks in the password update process (e.g. same password both in the "new password" and in the "retype password" buttons) an it continue working! :tada::tada::tada:

That said, I didn't set a check point and I'm not able to compare blocks used but it seems they are almost the same used in my previous version, so I don't understand where the problem were.
But, considering that everything correctly works now, it is not a problem anymore...I have to go on biulding my app! :wink:

Thank you very much for your help!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.