> ## Documentation Index
> Fetch the complete documentation index at: https://auth0.generaltranslation.app/llms.txt
> Use this file to discover all available pages before exploring further.

# MfaRecoveryCodeChallengeNewCode

MfaRecoveryCodeChallengeNewCode

```ts Example theme={null}
const screenManager = new MfaRecoveryCodeChallengeNewCode();
// Assuming a checkbox 'confirmSaved' is checked by the user
if (confirmSaved) {
  try {
    await screenManager.continue({ customData: 'optionalValue' });
  } catch (err) {
    // Handle errors, potentially check screenManager.transaction.errors
    console.error("Confirmation failed:", err);
  }
} else {
  // Prompt user to confirm saving the code
}
```

## Constructors

<ParamField body="MfaRecoveryCodeChallengeNewCode" type="Constructor">
  Initializes a new instance of the `MfaRecoveryCodeChallengeNewCode` class.
  It retrieves the necessary context (screen, transaction, etc.) and sets up screen-specific properties.

  #### Throws

  If the Universal Login Context is not available or if the screen name doesn't match.
</ParamField>

## Properties

<ParamField body="branding" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/BrandingMembers">BrandingMembers</a></span>} />

<ParamField body="client" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/ClientMembers">ClientMembers</a></span>} />

<ParamField body="organization" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/OrganizationMembers">OrganizationMembers</a></span>} />

<ParamField body="prompt" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/PromptMembers">PromptMembers</a></span>} />

<ParamField body="screen" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/ScreenMembersOnMfaRecoveryCodeChallengeNewCode">ScreenMembersOnMfaRecoveryCodeChallengeNewCode</a></span>}>
  Holds the specific screen data and properties, processed by ScreenOverride.
</ParamField>

<ParamField body="tenant" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/TenantMembers">TenantMembers</a></span>} />

<ParamField body="transaction" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/TransactionMembers">TransactionMembers</a></span>} />

<ParamField body="untrustedData" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/UntrustedDataMembers">UntrustedDataMembers</a></span>} />

<ParamField body="user" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/UserMembers">UserMembers</a></span>} />

<ParamField body="screenIdentifier" type="string">
  The unique identifier for this screen, used internally and for telemetry.
</ParamField>

## Methods

<ParamField body="continue" type="Promise<void>">
  Confirms that the user has saved the new recovery code and continues the authentication flow.
  This method sends a POST request to the `/u/mfa-recovery-code-challenge-new-code` endpoint
  with the required `state`, `action`, and `saved` parameters.

  A promise that resolves when the confirmation is successfully submitted.
  On success, the browser will typically be redirected to the next step.

  #### Throws

  Throws an error if the form submission fails (e.g., network issue, invalid state,
  or if the server responds with a 400 error like 'no-confirmation').

  ```typescript Example theme={null}
  const screenManager = new MfaRecoveryCodeChallengeNewCode();
  // Assuming a checkbox 'confirmSaved' is checked by the user
  if (confirmSaved) {
    try {
      await screenManager.continue({ customData: 'optionalValue' });
    } catch (err) {
      // Handle errors, potentially check screenManager.transaction.errors
      console.error("Confirmation failed:", err);
    }
  } else {
    // Prompt user to confirm saving the code
  }
  ```

  <Expandable title="Parameters">
    <ParamField body="payload?" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/MfaRecoveryCodeChallengeNewCodeContinueOptions">MfaRecoveryCodeChallengeNewCodeContinueOptions</a></span>}>
      Optional custom data to include with the request form body.
    </ParamField>
  </Expandable>
</ParamField>

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

  An array of error objects from the transaction context.
</ParamField>
