sendEmailVerification method

Future<void> sendEmailVerification()

Sends a verification email to a user.

The verification process is completed by calling applyActionCode.

A FirebaseAuthException maybe thrown with the following error code:

  • invalid-id-token: user's credential is no longer valid. The user must sign in again.
  • user-not-found: no user record corresponding to this identifier. The user may have been deleted.

Implementation

Future<void> sendEmailVerification() async {
  _assertSignedOut(_auth);

  try {
    await _auth._api.emailAndPasswordAuth.sendVerificationEmail(_idToken);
  } catch (e) {
    rethrow;
  }
}