Skip to main content
The MfaLoginOptions class implements the mfa-login-options screen functionality. This screen allows users to select which MFA factor they want to use for login.

Constructors

Create an instance of MfaLoginOptions screen.
Example
import MfaLoginOptions from '@auth0/auth0-acul-js/mfa-login-options';

const mfaLoginOptions = new MfaLoginOptions();
await mfaLoginOptions.enroll({
  action: 'push-notification'
});

Properties

Provides branding-related configurations, such as branding theme and settings.
Provides client-related configurations, such as id, name, and logoUrl.
Provides information about the user’s organization, such as organization id and name.
Contains data about the current prompt in the authentication flow.
Contains details specific to the mfa-login-options screen, including its configuration and context.
Contains data related to the tenant, such as id and associated metadata.
Provides transaction-specific data, such as active identifiers and flow states.
Handles untrusted data passed to the SDK, such as user input during login.
Details of the active user, including username, email, and roles.

Methods

enroll
(options ?)
This method continues the login process with the selected MFA factor
Example
const mfaLoginOptions = new MfaLoginOptions();
await mfaLoginOptions.enroll({
  action: 'push-notification'
});
options
OPTIONAL
The enrollment options including the selected factor.
getErrors
This method retrieves the array of transaction errors from the context, or an empty array if none exist.
returnToPrevious
(options ?)
This method navigates back to the previous screen.
Example
import MfaLoginOptions from '@auth0/auth0-acul-js/mfa-login-options';

const mfaLoginOptions = new MfaLoginOptions();
mfaLoginOptions.returnToPrevious();
options
OPTIONAL
Optional custom options to include with the request.