This class provides methods to handle the mfa-sms-challenge screen.
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge' ;
const mfaSmsChallenge = new MfaSmsChallenge ();
await mfaSmsChallenge . continueMfaSmsChallenge ({
code: '123456' ,
rememberDevice: true ,
});
Constructors
Creates an instance of MfaSmsChallenge screen manager
Properties
Methods
Submits the MFA SMS challenge with the provided code and rememberDevice option. import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge' ;
const mfaSmsChallenge = new MfaSmsChallenge ();
await mfaSmsChallenge . continueMfaSmsChallenge ({
code: '123456' ,
rememberDevice: true ,
});
Submits the action to switch to voice call verification. import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge' ;
const mfaSmsChallenge = new MfaSmsChallenge ();
await mfaSmsChallenge . getACall ();
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.
Submits the action to pick a different SMS configuration, if available. import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge' ;
const mfaSmsChallenge = new MfaSmsChallenge ();
await mfaSmsChallenge . pickSms ();
Submits the action to resend the SMS code. import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge' ;
const mfaSmsChallenge = new MfaSmsChallenge ();
await mfaSmsChallenge . resendCode ();
Utility FeatureGets resend functionality with timeout management for this screen ResendControl object with startResend method 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 ( `Resend available in ${ remainingSeconds } s, disabled: ${ isDisabled } ` );
},
onTimeout : () => {
console . log ( 'Resend is now available' );
}
});
// Call startResend when user clicks resend button
startResend ();
Configuration options for resend functionality Properties
Submits the action to try another MFA method. import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge' ;
const mfaSmsChallenge = new MfaSmsChallenge ();
await mfaSmsChallenge . tryAnotherMethod ();