Skip to main content
The ResetPasswordMfaRecoveryCodeChallenge class implements the reset-password-mfa-recovery-code-challenge screen functionality. This screen prompts the user to enter a recovery code as part of the MFA step during a password reset flow.

Constructors

Create an instance of ResetPasswordMfaRecoveryCodeChallenge screen manager
Example
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);
 }
};

Properties

Provides branding-related configurations, such as branding theme and settings.
Provides client-related configurations, such as id, name, and logoUrl, for the reset-password-mfa-recovery-code-challenge screen.
Provides information about the user’s organization, such as organization id and name.
Contains data about the current prompt in the authentication flow.
Contains details specific to the reset-password-mfa-recovery-code-challenge screen, including its configuration and context.
Contains data related to the tenant, such as id and associated metadata.
Provides transaction-specific data for the reset-password-mfa-recovery-code-challenge screen, such as active identifiers and flow states.
Handles untrusted data passed to the SDK, such as user input during the MFA challenge flow.
Details of the active user, including username, email, and roles.

Methods

continue
(options ?)
This method submits the recovery code to continue the MFA challenge during the password reset flow.
Example
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);
 }
};
options
OPTIONAL
Optional payload.
tryAnotherMethod
(options ?)
This method allows the user to select a different MFA method to complete the challenge.
Example
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);
 }
};
options
OPTIONAL
Optional payload.
getErrors
This method retrieves the array of transaction errors from the context, or an empty array if none exist.