sendSignInLinkToEmail method
Future<void>
sendSignInLinkToEmail({
- required String email,
- required ActionCodeSettings actionCodeSettings,
override
Sends a sign in with email link to provided 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.
The handleCodeInApp
of actionCodeSettings
must be set to true
otherwise an ArgumentError will be thrown.
A FirebaseAuthException
maybe thrown with the following error code:
- invalid-email:
- Thrown if the email address is not valid.
Implementation
@override
Future<void> sendSignInLinkToEmail({
required String email,
required ActionCodeSettings actionCodeSettings,
}) {
if (actionCodeSettings.handleCodeInApp != true) {
throw ArgumentError(
'The [handleCodeInApp] value of [ActionCodeSettings] must be `true`.',
);
}
maybeThrowException(
this,
Invocation.method(#sendSignInLinkToEmail, null,
{#email: email, #actionCodeSettings: actionCodeSettings}));
return Future.value();
}