Token in the reset password's mail: how to use it

160 views
Skip to first unread message

portapipe

unread,
Dec 5, 2015, 11:44:46 AM12/5/15
to Firebase Google Group
Hi everyone, I'm brand new here :)
I'm stuck in a stupid problem.
I'm trying to create an html (angularjs + angularfire) page for the password reset. I need it for an APP I'm creating in IONIC.
Now.
Everything is ok, the password reset mail is sent when the user ask that from the App, the link is fine and the html page read the token as expected. 
BUT: the Token is INVALID for "authWithCustomToken".
I've searched an answer for hours without success, I always have this error:

"INVALID_TOKEN: Could not parse auth token."

There's no docs on how to use the Token the auth password reset system create for each user.
I'm going crazy! :'(

Thanks :)

Frank van Puffelen

unread,
Dec 5, 2015, 3:05:41 PM12/5/15
to Firebase Google Group, port...@gmail.com
Hey portapipe,

The value sent to the user is a temporary password, not an OAuth or JWT token.


The generated temporary token lasts for 24 hours and can be used in place of the user's password in the other user management methods. Its main use is in the changePassword() method, where the temporary token may be used in place of the old user password to update the account.

portapipe

unread,
Dec 5, 2015, 8:22:23 PM12/5/15
to Firebase Google Group, port...@gmail.com
The generated temporary token lasts for 24 hours 

That phrase above make me take the wrong way! (I'm Italian and I didn't get every single word, I've read that and I've created a fluffy world full of tokens and stuff... sorry :P )
So I "just" need to send both token and email to my web page where I can call a "changePassword()" method, pass to it the email, the old password (token) and the new one and the job is done!
That's much easier than log the user in with the token, make him change password to the profile he is logged in with the token, then log him out and ask him to re-login... so much easier! =)

Thanks Frank, that's what I was looking for!
Reply all
Reply to author
Forward
0 new messages