nilsi nilsi - 8 months ago 67
Android Question

Change password with Firebase for Android

I want to implement change password functionality for my application.

I included
in my
file and so far everything has been working fine until I tried to implement change password functionality.

I found that the
object has a
method that takes a new password as the parameter. I could use this method and implement validation myself. However, I need the user's current password for comparing with the inputted one and I can't find a way to get that password.

I also found another method on the
object that takes the old password, new password, and a handler. The problem is that I need to also include
to access this class and when I am trying this method I'm getting to following error:

Projects created at must use the new Firebase Authentication SDKs available from

Feel like I'm missing something here. What's the recommended approach for implementing this? And when to use what dependency?

Answer Source

There is no way to retrieve the current password of a user from Firebase Authentication.

One way to allow your users to change their password is to show a dialog where they enter their current password and the new password they'd like. You then sign in (or re-authenticate) the user with the current passwordand call updatePassword() to update it.