Skip to main content
The ResetPasswordMfaEmailChallenge class implements the reset-password-mfa-email-challenge screen functionality. This screen prompts the user to enter the verification code sent to their email address as part of the MFA step during a password reset flow.

Constructors

Create an instance of ResetPasswordMfaEmailChallenge screen manager
Example
import ResetPasswordMfaEmailChallenge from '@auth0/auth0-acul-js/reset-password-mfa-email-challenge';

const resetPasswordMfaEmailChallengeManager = new ResetPasswordMfaEmailChallenge();
await resetPasswordMfaEmailChallengeManager.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 reset-password-mfa-email-challenge screen.
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 reset-password-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 reset-password-mfa-email-challenge screen, such as active identifiers and flow states.
Handles untrusted data passed to the SDK, such as user input during the MFA challenge flow.
Details of the active user, including username, email, and roles.

Methods

continue
(options ?)
This method submits the email verification code to continue the MFA challenge during the password reset flow.
Example
import ResetPasswordMfaEmailChallenge from '@auth0/auth0-acul-js/reset-password-mfa-email-challenge';

const resetPasswordMfaEmailChallengeManager = new ResetPasswordMfaEmailChallenge();
await resetPasswordMfaEmailChallengeManager.continue({
  code: '123456',
});
options
OPTIONAL
Optional payload.
resendCode
(options ?)
This method resends the verification code to the user’s email address.
Example
import ResetPasswordMfaEmailChallenge from '@auth0/auth0-acul-js/reset-password-mfa-email-challenge';

const resetPasswordMfaEmailChallengeManager = new ResetPasswordMfaEmailChallenge();
await resetPasswordMfaEmailChallengeManager.resendCode();
options
OPTIONAL
Optional payload.
resendManager
This method provides resend functionality with timeout management for the reset-password-mfa-email-challenge screen.
Example
import ResetPasswordMfaEmailChallenge from '@auth0/auth0-acul-js/reset-password-mfa-email-challenge';

const resetPasswordMfaEmailChallengeManager = new ResetPasswordMfaEmailChallenge();
const { startResend } = resetPasswordMfaEmailChallengeManager.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();
options
OPTIONAL
Optional payload.
tryAnotherMethod
(options ?)
This method allows the user to select a different MFA method to complete the challenge.
Example
import ResetPasswordMfaEmailChallenge from '@auth0/auth0-acul-js/reset-password-mfa-email-challenge';

const resetPasswordMfaEmailChallengeManager = new ResetPasswordMfaEmailChallenge();
await resetPasswordMfaEmailChallengeManager.tryAnotherMethod();
options
OPTIONAL
Optional payload.
getErrors
This method retrieves the array of transaction errors from the context, or an empty array if none exist.