Passer au contenu principal
undefined
Example
import PhoneIdentifierChallenge from '@auth0/auth0-acul-js/phone-identifier-challenge';
const phoneIdentifierChallenge = new PhoneIdentifierChallenge();
phoneIdentifierChallenge.submitPhoneChallenge({
    code: "<string>"
});

Constructeurs

PhoneIdentifierChallenge
Constructor

Propriétés

branding
client
organization
prompt
screen
tenant
transaction
untrustedData
user
screenIdentifier
string

Méthodes

getErrors
Retourne 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.
resendCode
Promise<void>
Example
import PhoneIdentifierChallenge from '@auth0/auth0-acul-js/phone-identifier-challenge';

const phoneIdentifierChallenge = new PhoneIdentifierChallenge();
phoneIdentifierChallenge.resendCode();
resendManager
Utility FeaturePermet d’obtenir la fonctionnalité de renvoi avec gestion du délai d’attente pour cet écran.Objet ResendControl doté de la méthode startResend.
Example
import PhoneIdentifierChallenge from '@auth0/auth0-acul-js/phone-identifier-challenge';
  const handleStatusChange = (remainingSeconds, isDisabled) => {
    setDisabled(isDisabled);
    setRemaining(remainingSeconds);
  };

  const handleTimeout = () => {
    console.log('Timeout completed, resend is now available');
  };

  const { startResend } = phoneChallenge.resendManager({
    timeoutSeconds: 30,
    onStatusChange: handleStatusChange,
    onTimeout: handleTimeout
  });
  
  // Appeler startResend lorsque l’utilisateur clique sur le bouton de renvoi
  await startResend();
returnToPrevious
Promise<void>
Example
import PhoneIdentifierChallenge from '@auth0/auth0-acul-js/phone-identifier-challenge';

const phoneIdentifierChallenge = new PhoneIdentifierChallenge();
phoneIdentifierChallenge.returnToPrevious();
submitPhoneChallenge
Promise<void>
Example
import PhoneIdentifierChallenge from '@auth0/auth0-acul-js/phone-identifier-challenge';

const phoneIdentifierChallenge = new PhoneIdentifierChallenge();
phoneIdentifierChallenge.submitPhoneChallenge({
    code: "<string>"
});
switchToText
Promise<void>
Example
import PhoneIdentifierChallenge from '@auth0/auth0-acul-js/phone-identifier-challenge';

const phoneIdentifierChallenge = new PhoneIdentifierChallenge();
phoneIdentifierChallenge.switchToText();
switchToVoice
Promise<void>
Example
import PhoneIdentifierChallenge from '@auth0/auth0-acul-js/phone-identifier-challenge';

const phoneIdentifierChallenge = new PhoneIdentifierChallenge();
phoneIdentifierChallenge.switchToVoice();