The MfaSmsList class implements the mfa-sms-list screen functionality.
Constructors
Create an instance of MfaSmsList screen
import MfaSmsList from '@auth0/auth0-acul-js/mfa-sms-list';
const mfaSmsList = new MfaSmsList();
const selectPhoneNumber = async () => {
const getEnrolledPhoneNumbers = mfaSmsList.user.enrolledPhoneNumbers;
const selectedNumber = getEnrolledPhoneNumbers[0];
await mfaSmsList.selectPhoneNumber({index: selectedNumber});
}
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 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 navigates back to the previous screen.import MfaSmsList from '@auth0/auth0-acul-js/mfa-sms-list';
const mfaSmsList = new MfaSmsList();
const handleBackAction = async () => {
try {
await mfaSmsList.backAction();
} catch (error) {
console.error('Failed to go back:', error);
}
};
An object containing any custom options.
[`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 selects a phone number from the list of enrolled phone numbers.import MfaSmsList from '@auth0/auth0-acul-js/mfa-sms-list';
const mfaSmsList = new MfaSmsList();
const selectPhoneNumber = async () => {
const getEnrolledPhoneNumbers = mfaSmsList.user.enrolledPhoneNumbers;
const selectedNumber = getEnrolledPhoneNumbers[0];
await mfaSmsList.selectPhoneNumber({index: selectedNumber});
}
Optional payload for the action.
[`key`: `string`]
"string" | "number" | "boolean" | "undefined"
Additional data collected from the user.
The index of the phone number to select.