The MfaSmsChallenge class implements the mfa-sms-challenge screen functionality.
Constructors
Create an instance of MfaSmsChallenge screen
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge' ;
const mfaSmsChallenge = new MfaSmsChallenge ();
await mfaSmsChallenge . continueMfaSmsChallenge ({
code: '123456' ,
rememberDevice: true ,
});
Properties
Provides branding-related configurations, such as branding theme and settings.
Provides client-related configurations, such as id, name, and logoUrl.
Provides information about the user’s organization, such as organization id and name.
Contains data about the current prompt in the authentication flow.
Contains details specific to the mfa-sms-challenge screen, including its configuration and context.
Contains data related to the tenant, such as id and associated metadata.
Provides transaction-specific data, such as active identifiers and flow states.
Handles untrusted data passed to the SDK, such as user input during login.
Details of the active user, including username, email, and roles.
Methods
This method 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 ,
});
The payload containing the code and rememberDevice option. The code entered by the user.
Indicates whether to remember the device.
[`key`: `string`]
"string" | "number" | "boolean" | "undefined"
Additional data collected from the user.
This method 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 ();
Optional custom options to include with the request. [`key`: `string`]
"string" | "number" | "boolean" | "undefined"
Additional data collected from the user.
This method retrieves the array of transaction errors from the context, or an empty array if none exist.
This method 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 ();
Optional custom options to include with the request. [`key`: `string`]
"string" | "number" | "boolean" | "undefined"
Additional data collected from the user.
This method 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 ();
Optional custom options to include with the request. [`key`: `string`]
"string" | "number" | "boolean" | "undefined"
Additional data collected from the user.
This method resends functionality with timeout management for this screen. A 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.
This method allows the user to try another MFA method. import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge' ;
const mfaSmsChallenge = new MfaSmsChallenge ();
await mfaSmsChallenge . tryAnotherMethod ();
Optional custom options to include with the request. [`key`: `string`]
"string" | "number" | "boolean" | "undefined"
Any additional custom options.