Class implementing the Reset Password MFA Recovery Code Challenge screen functionality.
import ResetPasswordMfaRecoveryCodeChallenge from '@auth0/auth0-acul-js/reset-password-mfa-recovery-code-challenge';
const resetPasswordMfaManager = new ResetPasswordMfaRecoveryCodeChallenge();
const continueWithRecoveryCode = async () => {
try {
await resetPasswordMfaManager.continue('RECOVERY_CODE');
console.log('Recovery code submitted successfully.');
} catch (error) {
console.error('Error submitting recovery code:', error);
}
};
Constructors
ResetPasswordMfaRecoveryCodeChallenge
Creates an instance of the ResetPasswordMfaRecoveryCodeChallenge screen.
Properties
Methods
Continues with the provided recovery code.import ResetPasswordMfaRecoveryCodeChallenge from '@auth0/auth0-acul-js/reset-password-mfa-recovery-code-challenge';
const resetPasswordMfaManager = new ResetPasswordMfaRecoveryCodeChallenge();
const continueWithRecoveryCode = async () => {
try {
await resetPasswordMfaManager.continue('RECOVERY_CODE');
console.log('Recovery code submitted successfully.');
} catch (error) {
console.error('Error submitting recovery code:', error);
}
};
stringThe recovery code entered by the user.
Retrieves the array of transaction errors from the context, or an empty array if none exist.An array of error objects from the transaction context.
Navigates to the screen where the user can pick another MFA method.import ResetPasswordMfaRecoveryCodeChallenge from '@auth0/auth0-acul-js/reset-password-mfa-recovery-code-challenge';
const resetPasswordMfaRecoveryCodeChallengeManager = new ResetPasswordMfaRecoveryCodeChallenge();
const handleTryAnotherMethod = async () => {
try {
await resetPasswordMfaRecoveryCodeChallengeManager.tryAnotherMethod();
} catch (error) {
console.error('Failed to try another method:', error);
}
};