I've been using Firebase's REST Auth API and everything's been great so far.
I'm trying to implement a password change feature (not reset, change), and I want to ask the user for the current password, validate it, then allow them to set their new password. Reading over the documentation, I see two approaches I can take:
Use the password to re-login and check for a 200 return code. The issue with this is that the previous
idTokenwill expire and I'll have to reset my Redux state—which isn't too bad.I know I can obtain the user's password hash , and if there's a way I can obtain Firebase's hashing algorithm, apply it, and compare to the database's password hash, I can also verify the password. This method just seems like a lot of work.
Is there a more straightforward approach, or am I best off sticking with option 1?