resend method
Future<ResendOutcome>
resend({
- required AuthRestClient auth,
- required String email,
- required String password,
Implementation
Future<ResendOutcome> resend({
required AuthRestClient auth,
required String email,
required String password,
}) async {
final SignInResult signIn;
try {
signIn = await auth.signInWithPassword(email, password);
} on AuthRestException catch (e) {
throw _mapResendSignInFailure(e);
}
try {
final verified = await auth.lookup(signIn.idToken);
if (verified) return ResendOutcome.alreadyVerified;
await auth.sendVerificationEmail(signIn.idToken);
return ResendOutcome.sent;
} on AuthRestException catch (e) {
throw _mapResendSignInFailure(e);
}
}