Skip to main content
MfaOtpChallenge
The MfaOtpChallenge class implements the mfa-otp-challenge screen functionality. This screen is shown when a user needs to enter an OTP code during MFA.

Constructors

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

const mfaOtpChallenge = new MfaOtpChallenge();
await mfaOtpChallenge.continue({
  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-otp-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

continue
(options ?)
This method continues with the OTP challenge using the provided code.
Example
import MfaOtpChallenge from '@auth0/auth0-acul-js/mfa-otp-challenge';

const mfaOtpChallenge = new MfaOtpChallenge();
await mfaOtpChallenge.continue({
  code: '123456',
  rememberDevice: true
});
options
OPTIONAL
The options containing the code and rememberDevice flag.
getErrors
This method retrieves the array of transaction errors from the context, or an empty array if none exist.
tryAnotherMethod
(options ?)
This method allows the user to try another MFA method.
Example
import MfaOtpChallenge from '@auth0/auth0-acul-js/mfa-otp-challenge';

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