I know how to update the password of signed in user in firebase auth:
var user = firebase.auth().currentUser; //get current connected user return user.updatePassword(newPass) .then( () => //success ) .catch(error => this.handleError(error)) }
But I don’t know how to do the same with a not signed in user. Perhaps retrieve user auth persistance only with his email with kind like that (but there is no way to do that):
var user = firebase.auth().getUserByEmail(email); //not implmented in auth firebase
PS: I don’t want to use the method sendPasswordResetEmail()
var auth = firebase.auth(); return auth.sendPasswordResetEmail(email);
Greatly appreciated help, Thanks !
The client-side Firebase SDKs only allow sending password reset (and other messages) to the currently signed in user, as any other calls would be major abuse vectors. So there is no way to send a password reset message to a user based on their email address alone.
If you want this functionality, you will have to implement it yourself. At the end of the process, you can then use the Firebase Admin SDK to update the password in the user’s profile.
- Firebase : How to send a password reset email backend with NodeJs
- Send Firebase Reset Password Email After Account Created On Server/Admin