> ## Documentation Index
> Fetch the complete documentation index at: https://auth0-actions-triggers-prototype.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# MfaEmailChallenge

> Describes all the properties and methods available to customize the Universal Login `mfa-email-challenge` screen.

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

<Frame>
  <img style={{maxHeight:"400px"}} src="https://mintlify.s3.us-west-1.amazonaws.com/auth0-actions-triggers-prototype/docs/images/cdy7uua7fh8z/2MOpok82dGPfHvpb8hy1Yc/fda2d95621af85e0ea6ff73d51d815ad/Screenshot_2025-02-20_at_13.11.50.png" alt="ACUL MFA Email Challenge" />
</Frame>

## Constructors

Create an instance of MFA Email Challenge screen manager:

```typescript Example theme={null}
import MfaEmailChallenge from '@auth0/auth0-acul-js/mfa-email-challenge';

const mfaEmailChallenge = new MfaEmailChallenge();
await mfaEmailChallenge.continue({
  code: '123456',
  rememberDevice: true
});
```

## Properties

<ParamField body="branding" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/BrandingMembers">BrandingMembers</a></span>}>
  Provides branding-related configurations, such as branding theme and settings.
</ParamField>

<ParamField body="client" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/ClientMembers">ClientMembers</a></span>}>
  Provides client-related configurations, such as `id`, `name`, and `logoUrl`, for the `mfa-email-challenge` screen.
</ParamField>

<ParamField body="organization" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/OrganizationMembers">OrganizationMembers</a></span>}>
  Provides information about the user's Organization, such as `id` and `name`.
</ParamField>

<ParamField body="prompt" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/PromptMembers">PromptMembers</a></span>}>
  Contains data about the current prompt in the authentication flow.
</ParamField>

<ParamField body="screen" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/ScreenMembersOnMfaEmailChallenge">ScreenMembersOnMfaEmailChallenge</a></span>}>
  Contains details specific to the `mfa-email-challenge` screen, including its configuration and context.
</ParamField>

<ParamField body="tenant" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/TenantMembers">TenantMembers</a></span>}>
  Contains data related to the tenant, such as `id` and associated metadata.
</ParamField>

<ParamField body="transaction" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/TransactionMembers">TransactionMembers</a></span>}>
  Provides transaction-specific data for the `mfa-email-challenge` screen, such as active identifiers and flow states.
</ParamField>

<ParamField body="untrustedData" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/UntrustedDataMembersOnMfaEmailChallenge">UntrustedDataMembersOnMfaEmailChallenge</a></span>}>
  Handles untrusted data passed to the SDK, such as user input during MFA email challenge.
</ParamField>

<ParamField body="user" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/UserMembers">UserMembers</a></span>}>
  Details of the active user, including `username`, `email`, and `roles`.
</ParamField>

## Methods

<ParamField body="changeLanguage" type="Promise<void>">
  This method changes the display language of the Universal Login page.

  ```typescript Example theme={null}
  import MfaEmailChallenge from '@auth0/auth0-acul-js/mfa-email-challenge';
  const mfaEmailChallenge = new MfaEmailChallenge();
  mfaEmailChallenge.changeLanguage({
    language: 'fr',
  });
  ```

  **Method Parameters**

  <Expandable title="Parameters">
    <ParamField body="options">
      [LanguageChangeOptions](/docs/libraries/acul/js-sdk/Screens/interfaces/LanguageChangeOptions).
    </ParamField>

    <ParamField body="language" type="string" required>
      The locale code for the desired language (for example, `'en'`, `'fr'`, `'es'`).
    </ParamField>

    <ParamField body="persist?" type="&#x22;session&#x22;">
      When set to `'session'`, the selected language persists for the duration of the session.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="continue" type="Promise<void>">
  This method continues with the email challenge using the provided code.

  ```typescript Example theme={null}
  import MfaEmailChallenge from '@auth0/auth0-acul-js/mfa-email-challenge';

  const mfaEmailChallenge = new MfaEmailChallenge();
  await mfaEmailChallenge.continue({
    code: '123456',
    rememberDevice: true
  });
  ```

  **Method Parameters**

  <Expandable title="Parameters">
    <ParamField body="options">
      [ContinuePayloadOptions](/docs/libraries/acul/js-sdk/Screens/interfaces/ContinuePayloadOptions).
    </ParamField>

    <ParamField body="code" type="string" required>
      The code entered by the user.
    </ParamField>

    <ParamField body="rememberDevice?" type="boolean">
      Indicates whether to remember the device.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="getErrors" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/Error">Error</a>[]</span>}>
  This method retrieves the array of transaction errors from the context, or an empty array if none exist.
</ParamField>

<ParamField body="pickEmail" type="Promise<void>">
  This method submits the action to pick a different Email configuration, if available.

  ```typescript Example theme={null}
  import MfaEmailChallenge from '@auth0/auth0-acul-js/mfa-email-challenge';

  const mfaEmailChallenge = new MfaEmailChallenge();
  await mfaEmailChallenge.pickEmail();
  ```
</ParamField>

<ParamField body="resendCode" type="Promise<void>">
  This method resends the email code.

  ```typescript Example theme={null}
  import MfaEmailChallenge from '@auth0/auth0-acul-js/mfa-email-challenge';
  const mfaEmailChallenge = new MfaEmailChallenge();
  await mfaEmailChallenge.resendCode();
  ```
</ParamField>

<ParamField body="resendManager" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/ResendControl">ResendControl</a></span>}>
  This method provides resend functionality with timeout management for this screen.

  ```typescript Example theme={null}
  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**

  <Expandable title="Parameters">
    <ParamField body="options">
      [StartResendOptions](/docs/libraries/acul/js-sdk/Screens/interfaces/StartResendOptions).
    </ParamField>

    <ParamField body="timeoutSeconds?" type="number">
      The cooldown duration in seconds before the user can resend the code again.
    </ParamField>

    <ParamField body="onStatusChange?" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/type-aliases/OnStatusChangeCallback">OnStatusChangeCallback</a></span>}>
      Callback invoked whenever the resend status changes, it returns the remaining seconds and if the resend functionality is currently disabled.
    </ParamField>

    <ParamField body="onTimeout?" type="() => void">
      Callback invoked when the cooldown expires and resend becomes available again.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="tryAnotherMethod" type="Promise<void>">
  This method allows the user to try another MFA method.

  ```typescript Example theme={null}
  import MfaEmailChallenge from '@auth0/auth0-acul-js/mfa-email-challenge';

  const mfaEmailChallenge = new MfaEmailChallenge();
  await mfaEmailChallenge.tryAnotherMethod();
  ```
</ParamField>
