sendPasswordResetEmail method

Future<String> sendPasswordResetEmail({
  1. required String email,
  2. String? continueUrl,
})

Sends a password reset email to the given email address.

To complete the password reset, call confirmPasswordReset with the code supplied in the email sent to the user, along with the new password specified by the user.

May throw a FirebaseAuthException with the following error codes:

  • email-exists
    • The email address is already in use by another account.
  • invalid-id-token
    • The user's credential is no longer valid. The user must sign in again.

Implementation

Future<String> sendPasswordResetEmail(
    {required String email, String? continueUrl}) async {
  try {
    return await _api.emailAndPasswordAuth.sendPasswordResetEmail(email);
  } catch (e) {
    rethrow;
  }
}