Class implementing the MFA Recovery Code Challenge screen functionality.
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
Creates an instance of the MfaRecoveryCodeChallenge screen.
Properties
Methods
Continues with the provided recovery code.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);
}
}
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 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);
}
};