Passer au contenu principal
Cette classe fournit des méthodes pour gérer l’écran mfa-sms-challenge.
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.continueMfaSmsChallenge({
  code: '123456',
  rememberDevice: true,
});

Constructeurs

MfaSmsChallenge
Constructor
Crée une instance du gestionnaire d’écran MfaSmsChallenge

Propriétés

branding
client
organization
prompt
screen
tenant
transaction
untrustedData
user
screenIdentifier
string

Méthodes

continueMfaSmsChallenge
Promise<void>
Soumet le défi AMF (MFA) SMS avec le code fourni et l’option rememberDevice.
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.continueMfaSmsChallenge({
  code: '123456',
  rememberDevice: true,
});
getACall
Promise<void>
Soumet l’action pour passer à la vérification par appel vocal.
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.getACall();
getErrors
Récupère le tableau des erreurs de la transaction à partir du contexte, ou un tableau vide s’il n’en existe aucune.Un tableau d’objets Error provenant du contexte de transaction.
pickSms
Promise<void>
Soumet l’action pour choisir une autre configuration SMS, si disponible.
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.pickSms();
resendCode
Promise<void>
Soumet l’action pour renvoyer le code SMS.
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.resendCode();
resendManager
Fonction utilitaireRécupère la fonctionnalité de renvoi avec gestion du délai d’attente pour cet écran.Objet ResendControl avec la méthode startResend.
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
const { startResend } = mfaSmsChallenge.resendManager({
  timeoutSeconds: 15,
  onStatusChange: (remainingSeconds, isDisabled) => {
    console.log(`Renvoi disponible dans ${remainingSeconds}s, désactivé : ${isDisabled}`);
  },
  onTimeout: () => {
    console.log('Le renvoi est maintenant disponible');
  }
});

// Appeler startResend lorsque l’utilisateur clique sur le bouton de renvoi
startResend();
tryAnotherMethod
Promise<void>
Soumet l’action pour essayer une autre méthode d’AMF (MFA).
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.tryAnotherMethod();