Skip to main content
Class implementing the MFA Recovery Code Challenge screen functionality.
Example
import MfaRecoveryCodeChallenge from '@auth0/auth0-acul-js/mfa-recovery-code-challenge';
const mfaRecoveryCodeChallengeManager = new MfaRecoveryCodeChallenge();
const handleContinueEnrollment = async () => {
 try {
   await mfaRecoveryCodeChallengeManager.continue('YOUR_RECOVERY_CODE');
 } catch (error) {
   console.error('Error continuing with recovery code:', error);
 }
}

Constructors

MfaRecoveryCodeChallenge
Constructor
Creates an instance of the MfaRecoveryCodeChallenge screen.

Properties

branding
client
organization
prompt
screen
tenant
transaction
untrustedData
user
screenIdentifier
string

Methods

continue
Promise<void>
Continues with the provided recovery code.
Example
import MfaRecoveryCodeChallenge from '@auth0/auth0-acul-js/mfa-recovery-code-challenge';
const mfaRecoveryCodeChallengeManager = new MfaRecoveryCodeChallenge();
const handleContinueEnrollment = async () => {
 try {
   await mfaRecoveryCodeChallengeManager.continue('YOUR_RECOVERY_CODE');
 } catch (error) {
   console.error('Error continuing with recovery code:', error);
 }
}
getErrors
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.
tryAnotherMethod
Promise<void>
Navigates to the screen where the user can pick another MFA method.
Example
import MfaRecoveryCodeChallenge from '@auth0/auth0-acul-js/mfa-recovery-code-challenge';
const mfaRecoveryCodeChallengeManager = new MfaRecoveryCodeChallenge();
const switchAuthenticator = async () => {
 try {
   await mfaRecoveryCodeChallengeManager.tryAnotherMethod();
   console.log('Switched to another authentication method.');
 } catch (error) {
   console.error('Error switching authenticator:', error);
 }
};