Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Change Password with firebase cloud functions

I have found documents (Manage Users ** Firebase Official docs) on how to change a password but not how to use a cloud function. The user.updatePassword(newPassword).then(() => { does not work for a cloud function. –> At lease that i am aware of…
My Goal if possible, is to pass the users userid and new password in a similar fashion to the above and have it change. Any examples or firebase doc’s i might have missed would be great.
Cheers

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Inside Cloud Function you’re using the Firebase Admin SDK to access Firebase Authentication, so you can update the user through that to set their password. From that link:

getAuth()
  .updateUser(uid, {
    password: 'newPassword',
  })
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading