Reputation: 83
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
Upvotes: 2
Views: 897
Reputation: 599621
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',
})
Upvotes: 5