verifyPasswordResetCode method
Verifies the password reset verification code.
On success, stores the finish password reset token to be used with finishPasswordReset. On failure, transitions to error state with the error message.
Implementation
Future<void> verifyPasswordResetCode() async {
await runGuarded(() async {
final passwordResetRequestId = requestId;
if (passwordResetRequestId == null) {
throw StateError('No password reset request was found to verify.');
}
finishRequestToken = await emailEndpoint.verifyPasswordResetCode(
passwordResetRequestId: passwordResetRequestId,
verificationCode: verificationCodeController.text.trim(),
);
return completePasswordResetScreen;
});
}