finishPasswordReset method
Completes a password reset request by setting a new password.
The verificationCode returned from verifyPasswordResetCode is used to
validate the password reset request.
Throws an EmailAccountPasswordResetException in case of errors, with reason:
- EmailAccountPasswordResetExceptionReason.expired if the password reset request has already expired.
- EmailAccountPasswordResetExceptionReason.policyViolation if the new password does not comply with the password policy.
- EmailAccountPasswordResetExceptionReason.invalid if no request exists
for the given
passwordResetRequestIdorverificationCodeis invalid.
Throws an AuthUserBlockedException if the auth user is blocked.
Implementation
Future<void> finishPasswordReset(
final Session session, {
required final String finishPasswordResetToken,
required final String newPassword,
}) async {
await emailIdp.finishPasswordReset(
session,
finishPasswordResetToken: finishPasswordResetToken,
newPassword: newPassword,
);
}