Skip to main content

Documentation Index

Fetch the complete documentation index at: https://auth0.com/llms.txt

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

The PhoneIdentifierChallenge class implements the phone-identifier-challenge screen functionality. This screen prompts the user to enter a verification code sent to their phone number to confirm their identity.
undefined

Constructors

Create an instance of PhoneIdentifierChallenge screen manager:
Example
import PhoneIdentifierChallenge from '@auth0/auth0-acul-js/phone-identifier-challenge';
const phoneIdentifierChallengeManager = new PhoneIdentifierChallenge();
await phoneIdentifierChallengeManager.submitPhoneChallenge({
  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 phone-identifier-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 phone-identifier-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 phone-identifier-challenge screen, such as active identifiers and flow states.
Handles untrusted data passed to the SDK, such as user input during the phone challenge flow.
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 PhoneIdentifierChallenge from '@auth0/auth0-acul-js/phone-identifier-challenge';
const phoneIdentifierChallengeManager = new PhoneIdentifierChallenge();
phoneIdentifierChallengeManager.changeLanguage({
  language: 'fr',
});
Method Parameters

getErrors
This method retrieves the array of transaction errors from the context, or an empty array if none exist.

resendCode
Promise<void>
This method resends the verification code to the user’s phone number.
Example
import PhoneIdentifierChallenge from '@auth0/auth0-acul-js/phone-identifier-challenge';
const phoneIdentifierChallengeManager = new PhoneIdentifierChallenge();
await phoneIdentifierChallengeManager.resendCode();
Method Parameters

resendManager
This method provides resend functionality with timeout management. It returns a ResendControl object with a startResend() method that triggers the resend and enforces a cooldown period before the user can resend again.
Example
import PhoneIdentifierChallenge from '@auth0/auth0-acul-js/phone-identifier-challenge';
const phoneIdentifierChallengeManager = new PhoneIdentifierChallenge();
const { startResend } = phoneIdentifierChallengeManager.resendManager({
  timeoutSeconds: 30,
});
await startResend();
Method Parameters

returnToPrevious
Promise<void>
This method navigates the user back to the previous screen.
Example
import PhoneIdentifierChallenge from '@auth0/auth0-acul-js/phone-identifier-challenge';
const phoneIdentifierChallengeManager = new PhoneIdentifierChallenge();
await phoneIdentifierChallengeManager.returnToPrevious();
Method Parameters

submitPhoneChallenge
Promise<void>
This method submits the phone verification code to complete the challenge.
Example
import PhoneIdentifierChallenge from '@auth0/auth0-acul-js/phone-identifier-challenge';
const phoneIdentifierChallengeManager = new PhoneIdentifierChallenge();
await phoneIdentifierChallengeManager.submitPhoneChallenge({
  code: '123456',
});
Method Parameters

switchToText
Promise<void>
This method switches the delivery method for the verification code to SMS text message.
Example
import PhoneIdentifierChallenge from '@auth0/auth0-acul-js/phone-identifier-challenge';
const phoneIdentifierChallengeManager = new PhoneIdentifierChallenge();
await phoneIdentifierChallengeManager.switchToText();
Method Parameters

switchToVoice
Promise<void>
This method switches the delivery method for the verification code to a voice call.
Example
import PhoneIdentifierChallenge from '@auth0/auth0-acul-js/phone-identifier-challenge';
const phoneIdentifierChallengeManager = new PhoneIdentifierChallenge();
await phoneIdentifierChallengeManager.switchToVoice();
Method Parameters