Skip to main content

Documentation Index

Fetch the complete documentation index at: https://auth0-feat-tab-ia.mintlify.app/llms.txt

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

The MfaEmailChallenge class implements the mfa-email-challenge screen functionality. This screen is shown when a user needs to verify their email during MFA.
ACUL MFA Email Challenge

Constructors

Create an instance of MFA Email Challenge screen manager:
Example
import MfaEmailChallenge from '@auth0/auth0-acul-js/mfa-email-challenge';

const mfaEmailChallenge = new MfaEmailChallenge();
await mfaEmailChallenge.continue({
  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-email-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-email-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-email-challenge screen, such as active identifiers and flow states.
Handles untrusted data passed to the SDK, such as user input during MFA email 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 MfaEmailChallenge from '@auth0/auth0-acul-js/mfa-email-challenge';
const mfaEmailChallenge = new MfaEmailChallenge();
mfaEmailChallenge.changeLanguage({
  language: 'fr',
});
Method Parameters

continue
Promise<void>
This method continues with the email challenge using the provided code.
Example
import MfaEmailChallenge from '@auth0/auth0-acul-js/mfa-email-challenge';

const mfaEmailChallenge = new MfaEmailChallenge();
await mfaEmailChallenge.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.
pickEmail
Promise<void>
This method submits the action to pick a different Email configuration, if available.
Example
import MfaEmailChallenge from '@auth0/auth0-acul-js/mfa-email-challenge';

const mfaEmailChallenge = new MfaEmailChallenge();
await mfaEmailChallenge.pickEmail();
Method Parameters

resendCode
Promise<void>
This method resends the email code.
Example
import MfaEmailChallenge from '@auth0/auth0-acul-js/mfa-email-challenge';
const mfaEmailChallenge = new MfaEmailChallenge();
await mfaEmailChallenge.resendCode();
Method Parameters

resendManager
This method provides resend functionality with timeout management for this screen.
Example
import MfaEmailChallenge from '@auth0/auth0-acul-js/mfa-email-challenge';

const mfaEmailChallenge = new MfaEmailChallenge();
const { startResend } = mfaEmailChallenge.resendManager({
  timeoutSeconds: 15,
  onStatusChange: (remainingSeconds, isDisabled) => {
    console.log(`Resend available in ${remainingSeconds}s, disabled: ${isDisabled}`);
  },
  onTimeout: () => {
    console.log('Resend is now available');
  }
});

// Call startResend when user clicks resend button
startResend();
Method Parameters

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

const mfaEmailChallenge = new MfaEmailChallenge();
await mfaEmailChallenge.tryAnotherMethod();
Method Parameters