Skip to main content
The MfaSmsChallenge class implements the mfa-sms-challenge screen functionality.
MfaSmsChallenge

Constructors

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

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.continueMfaSmsChallenge({
  code: '123456',
  rememberDevice: true,
});

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-challenge 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

continueMfaSmsChallenge
(options ?)
This method submits the MFA SMS challenge with the provided code and rememberDevice option.
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.continueMfaSmsChallenge({
  code: '123456',
  rememberDevice: true,
});
options
OPTIONAL
The payload containing the code and rememberDevice option.
getACall
(options ?)
This method submits the action to switch to voice call verification.
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.getACall();
options
OPTIONAL
Optional custom options to include with the request.
getErrors
This method retrieves the array of transaction errors from the context, or an empty array if none exist.
pickSms
(options ?)
This method submits the action to pick a different SMS configuration, if available.
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.pickSms();
options
OPTIONAL
Optional custom options to include with the request.
resendCode
(options ?)
This method submits the action to resend the SMS code.
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.resendCode();
options
OPTIONAL
Optional custom options to include with the request.
resendManager
This method resends functionality with timeout management for this screen. A ResendControl object with startResend method
Example
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();
options
OPTIONAL
Configuration options for resend functionality.
tryAnotherMethod
(options ?)
This method allows the user to try another MFA method.
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.tryAnotherMethod();
options
OPTIONAL
Optional custom options to include with the request.