Skip to main content

Documentation Index

Fetch the complete documentation index at: https://auth0-fix-auth-api-docs-migration-completion.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The MfaSmsChallenge class implements the mfa-sms-challenge screen functionality. This screen is displayed when the user needs to enter an SMS code to verify their identity.
MfaSmsChallenge

Constructors

Create an instance of MFA SMS Challenge screen manager:
Example
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, for the mfa-sms-challenge screen.
Provides information about the user’s Organization, such as 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 for the mfa-sms-challenge screen, such as active identifiers and flow states.
Handles untrusted data passed to the SDK, such as user input during MFA SMS challenge.
Details of the active user, including username, email, and roles.

Methods

changeLanguage
Promise<void>
This method changes the display language of the Universal Login page.
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
mfaSmsChallenge.changeLanguage({
  language: 'fr',
});
Method Parameters

continueMfaSmsChallenge
Promise<void>
This method submits the MFA SMS challenge with the provided code.
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

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

getACall
Promise<void>
This method switches the verification method to a voice call.
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.getACall();
Method Parameters

getErrors
This method retrieves the array of transaction errors from the context, or an empty array if none exist.
pickSms
Promise<void>
This method navigates to the screen where the user can pick a different SMS number.
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.pickSms();
Method Parameters

resendCode
Promise<void>
This method resends the SMS verification code to the user.
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.resendCode();
Method Parameters

resendManager
This method provides resend functionality with configurable timeout and status management.
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');
  },
});

startResend();
Method Parameters

tryAnotherMethod
Promise<void>
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();
Method Parameters