import PhoneIdentifierChallenge from '@auth0/auth0-acul-js/phone-identifier-challenge';const phoneIdentifierChallenge = new PhoneIdentifierChallenge();phoneIdentifierChallenge.submitPhoneChallenge({ code: "<string>"});
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.
import PhoneIdentifierChallenge from '@auth0/auth0-acul-js/phone-identifier-challenge';const phoneIdentifierChallenge = new PhoneIdentifierChallenge();phoneIdentifierChallenge.resendCode();
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
Copier
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();
import PhoneIdentifierChallenge from '@auth0/auth0-acul-js/phone-identifier-challenge';const phoneIdentifierChallenge = new PhoneIdentifierChallenge();phoneIdentifierChallenge.returnToPrevious();
import PhoneIdentifierChallenge from '@auth0/auth0-acul-js/phone-identifier-challenge';const phoneIdentifierChallenge = new PhoneIdentifierChallenge();phoneIdentifierChallenge.submitPhoneChallenge({ code: "<string>"});
import PhoneIdentifierChallenge from '@auth0/auth0-acul-js/phone-identifier-challenge';const phoneIdentifierChallenge = new PhoneIdentifierChallenge();phoneIdentifierChallenge.switchToText();
import PhoneIdentifierChallenge from '@auth0/auth0-acul-js/phone-identifier-challenge';const phoneIdentifierChallenge = new PhoneIdentifierChallenge();phoneIdentifierChallenge.switchToVoice();