Skip to main content
The MfaSmsEnrollment class implements the mfa-sms-enrollment screen functionality.
MfaEmailChallenge

Constructors

Create an instance of MfaSmsEnrollment screen
Example
import MfaSmsEnrollment from '@auth0/auth0-acul-js/mfa-sms-enrollment';

const mfaSmsEnrollment = new MfaSmsEnrollment();
await mfaSmsEnrollment.pickCountryCode();

Properties

branding
Provides branding-related configurations, such as branding theme and settings.
client
Provides client-related configurations, such as id, name, and logoUrl.
organization
Provides information about the user’s organization, such as organization id and name.
prompt
Contains data about the current prompt in the authentication flow.
screen
Contains details specific to the mfa-sms-enrollment screen, including its configuration and context.
tenant
Contains data related to the tenant, such as id and associated metadata.
transaction
Provides transaction-specific data, such as active identifiers and flow states.
untrustedData
Handles untrusted data passed to the SDK, such as user input during login.
user
Details of the active user, including username, email, and roles.

Methods

continueEnrollment
(options ?)
This method continues the SMS enrollment process with the provided phone number. Returns a promise that resolves when the enrollment process is complete.
Example
import MfaSmsEnrollment from '@auth0/auth0-acul-js/mfa-sms-enrollment';

const mfaSmsEnrollment = new MfaSmsEnrollment();
await mfaSmsEnrollment.continueEnrollment({ phone: '1234567890' });
options
OPTIONAL
The phone number to use for enrollment.
getErrors
This method retrieves the array of transaction errors from the context, or an empty array if none exist.
pickCountryCode
(options ?)
This method handles the action to pick a country code for SMS enrollment. Returns a promise that resolves when the action is complete.
Example
import MfaSmsEnrollment from '@auth0/auth0-acul-js/mfa-sms-enrollment';

const mfaSmsEnrollment = new MfaSmsEnrollment();
await mfaSmsEnrollment.pickCountryCode();
options
OPTIONAL
Optional custom options to include in the request.
tryAnotherMethod
(options ?)
This method handles the action to try another method for MFA. Returns a promise that resolves when the action is complete.
Example
import MfaSmsEnrollment from '@auth0/auth0-acul-js/mfa-sms-enrollment';

const mfaSmsEnrollment = new MfaSmsEnrollment();
await mfaSmsEnrollment.tryAnotherMethod();
options
OPTIONAL
Optional custom options to include in the request.