I am looking to update the firebase email in the authentication. Once I update the email, and if I check back the Firebase Authentication, I am hoping to see the new email. Next time when I try to login, then I can login with the new email, but can use the old password. Is it possible (if at all)?
2
Answers
You can use the Firebase Admin SDK to modify an existing user’s data, including it’s email, see the documentation.
So, with the user uid and the new email you would do as follows:
The above code is Node.js code that you can, for example, run in a Cloud Function or even as a Node.js script from you computer (See the section names "For Firestore" of this SO answer for an example).
Renaud’s answer shows how you can change the email address for any user in a trusted environment.
If you want the user themselves to be able to change their email address from the Flutter app, you can use
verifyBeforeUpdateEmail
for that.