Alex
Alex

Reputation: 505

Firebase fails to send password reset email from console

The existing user has trouble signing in and wants to reset the password. She doesn’t receive any reset password emails. We also tried to send the reset email through Firebase Console but no luck - no emails got delivered.

Is there any way to set a password manually through Firebase console or any other workaround?

Thanks!

Upvotes: 1

Views: 2420

Answers (4)

Alex
Alex

Reputation: 505

Issue got resolved. SendGrid (service that Firebase uses to send emails) had some maintenance during 8 hours in Asia region (my user is from Asia region) that's why it was working for me and not working for her.

Check SendGrid status URL: http://status.sendgrid.com

Thanks for all your suggestions!

Upvotes: 1

Tamara Koliada
Tamara Koliada

Reputation: 1194

  1. Firebase Admin SDK sounds like a good option
  2. Check SMTP settings in the reset mail template
  3. De-hash password manually :)

enter image description here

Upvotes: 1

Frank van Puffelen
Frank van Puffelen

Reputation: 598728

You can set the user's password through Firebase's Admin SDKs. These SDKs run with administrative privileges, so should only be run in a trusted environment such as your development machine, a server you control, or Cloud Functions.

This is an example of setting a user's password with Node.js:

admin.auth().updateUser(uid, { password: "newPassword" })

For more samples (including in other supported languages), see the documentation on updating a user profile.

Upvotes: 2

Tamara Koliada
Tamara Koliada

Reputation: 1194

You can set a user's password with the updatePassword method and send "SOME-SECURE-PASSWORD" :)

For example:

FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
String newPassword = "SOME-SECURE-PASSWORD";

user.updatePassword(newPassword)
        .addOnCompleteListener(new OnCompleteListener<Void>() {
            @Override
            public void onComplete(@NonNull Task<Void> task) {
                if (task.isSuccessful()) {
                    Log.d(TAG, "User password updated.");
                }
            }
        });

Documentation is here

Upvotes: 0

Related Questions