Skip to main content

Documentation Index

Fetch the complete documentation index at: https://auth0-feat-quickstart-jsonld-schema.mintlify.app/llms.txt

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

The MfaVoiceChallenge class implements the mfa-voice-challenge screen functionality. This screen is displayed when the user needs to enter a code received via voice call to verify their identity.
MfaVoiceChallenge

Constructors

Create an instance of MFA Voice Challenge screen manager:
Example
import MfaVoiceChallenge from '@auth0/auth0-acul-js/mfa-voice-challenge';

const mfaVoiceChallenge = new MfaVoiceChallenge();
await mfaVoiceChallenge.continue({ code: '123456' });

Properties

Provides branding-related configurations, such as branding theme and settings.
Provides client-related configurations, such as id, name, and logoUrl, for the mfa-voice-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-voice-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-voice-challenge screen, such as active identifiers and flow states.
Handles untrusted data passed to the SDK, such as user input during MFA voice 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 MfaVoiceChallenge from '@auth0/auth0-acul-js/mfa-voice-challenge';

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

continue
Promise<void>
This method submits the voice verification code to validate the MFA challenge.
Example
import MfaVoiceChallenge from '@auth0/auth0-acul-js/mfa-voice-challenge';

const mfaVoiceChallenge = new MfaVoiceChallenge();
await mfaVoiceChallenge.continue({
  code: '123456',
  rememberDevice: true,
});
Method Parameters

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

const mfaVoiceChallenge = new MfaVoiceChallenge();
await mfaVoiceChallenge.pickPhone();
Method Parameters

resendCode
Promise<void>
This method requests a new voice call with a verification code.
Example
import MfaVoiceChallenge from '@auth0/auth0-acul-js/mfa-voice-challenge';

const mfaVoiceChallenge = new MfaVoiceChallenge();
await mfaVoiceChallenge.resendCode();
Method Parameters

resendManager
This method provides resend functionality with configurable timeout and status management.
Example
import MfaVoiceChallenge from '@auth0/auth0-acul-js/mfa-voice-challenge';

const mfaVoiceChallenge = new MfaVoiceChallenge();
const { startResend } = mfaVoiceChallenge.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

switchToSms
Promise<void>
This method switches the verification method to SMS.
Example
import MfaVoiceChallenge from '@auth0/auth0-acul-js/mfa-voice-challenge';

const mfaVoiceChallenge = new MfaVoiceChallenge();
await mfaVoiceChallenge.switchToSms();
Method Parameters

tryAnotherMethod
Promise<void>
This method allows the user to try another MFA method.
Example
import MfaVoiceChallenge from '@auth0/auth0-acul-js/mfa-voice-challenge';

const mfaVoiceChallenge = new MfaVoiceChallenge();
await mfaVoiceChallenge.tryAnotherMethod();
Method Parameters