We had a user signup with an invalid email address (@gmail.comp
) so as soon as he loses his session, he's going to be permanently locked out since password reset emails won't get to him.
We don't have "change your email" functionality built and even if we did, he's probably not aware his email address is wrong. Can I, as an admin, change the user's email address? It seems that firebase.auth().currentUser.updateEmail()
would only work if my user triggered the request.
You will also need to reauthenticate the login prior to calling this as Firebase requires a fresh authentication to perform certain account functions such as deleting the account, changing the email or the password.
Open your project in the Firebase console. Go to the Email Templates page in the Auth section. In any of the Email Types entries, click the pencil icon to edit the email template. Click customize action URL, and specify the URL to your custom email action handler.
uid cannot be changed. You can create your own custom uid for users. You will need a users table which uses your custom uid rather than the one created by Firebase.
If you're using the Admin SDK you can update most properties of the user's account, including their email address. See the documentation on updating a user.
The simplest example (in Node.js) would be:
admin.auth().updateUser(uid, {
email: "[email protected]"
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With