Passer au contenu principal
Classe qui implémente la fonctionnalité de l’écran de vérification par code de récupération AMF (MFA).
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);
 }
}

Constructeurs

MfaRecoveryCodeChallenge
Constructor
Crée une instance de l’écran MfaRecoveryCodeChallenge.

Propriétés

branding
client
organization
prompt
screen
tenant
transaction
untrustedData
user
screenIdentifier
string

Méthodes

continue
Promise<void>
Poursuit en utilisant le code de récupération fourni.
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
Récupère le tableau des erreurs de transaction à partir du contexte, ou un tableau vide s’il n’y en a aucune.Un tableau d’objets d’erreur provenant du contexte de transaction.
tryAnotherMethod
Promise<void>
Navigue vers l’écran où l’utilisateur peut choisir une autre méthode d’AMF (MFA).
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);
 }
};