MFA Recovery Code Challenge screen class

The Recovery Code Challenge screen class provides methods associated with the mfa-recovery-code-challenge screen. This screen is displayed when the user needs to enter a recovery code to log in.
Import and instantiate the MFA Recovery Code Challenge screen class:
import MfaRecoveryCodeChallenge from '@auth0/auth0-acul-js/mfa-recovery-code-challenge';

const mfaRecoveryCodeChallenge = new MfaRecoveryCodeChallenge();

Properties

The MFA Recovery Code Challenge screen class properties are:
interface branding {
  settings: null | BrandingSettings;
  themes: null | BrandingThemes;
}

interface BrandingSettings {
  colors?: {
    pageBackground?: string | {
      angleDeg: number;
      end: string;
      start: string;
      type: string;
    };
    primary?: string;
  };
  faviconUrl?: string;
  font?: {url: string;};
  logoUrl?: string;
}

interface BrandingThemes {
  default: {
    borders: Record<string, string | number | boolean>;
    colors: Record<string, string>;
    displayName: string;
    fonts: Record<string, string | boolean | object>;
    pageBackground: Record<string, string>;
    widget: Record<string, string | number>;
  };
}

Methods

The MFA Recovery Code Challenge screen class methods are:

continue( options ?)

This method continues the MFA Recovery Code Challenge flow.
import MfaRecoveryCodeChallenge from '@auth0/auth0-acul-js/mfa-recovery-code-challenge';
const mfaRecoveryCodeChallenge = new MfaRecoveryCodeChallenge();

mfaRecoveryCodeChallenge.continue({
  code: '123456',
});
Parameter                 TypeRequiredDescription
codestringYesThe code entered by the user.
[key: string]string | number | boolean | undefinedNoOptional data collected from user.

tryAnotherMethod( options ?)

This method asks the user to try another challenge.
import MfaRecoveryCodeChallenge from '@auth0/auth0-acul-js/mfa-recovery-code-challenge';
const mfaRecoveryCodeChallenge = new MfaRecoveryCodeChallenge();

mfaRecoveryCodeChallenge.tryAnotherMethod();
Parameter                 TypeRequiredDescription
[key: string]string | number | boolean | undefinedNoOptional data collected from user.

MFA Recovery Code Challenge New Code screen class

The MFA Recovery Code Challenge New Code screen class provides methods associated with the mfa-recovery-code-challenge-new-code screen. This screen displays the MFA recovery code for safe keeping.
Import and instantiate the MFA Recovery Code Challenge New Code screen class:
import MfaRecoveryCodeChallengeNewCode from '@auth0/auth0-acul-js/mfa-recovery-code-challenge-new-code';

const mfaRecoveryCodeChallengeNewCode = new MfaRecoveryCodeChallengeNewCode();

Properties

The MFA Recovery Code Challenge New Code screen class properties are:
interface branding {
  settings: null | BrandingSettings;
  themes: null | BrandingThemes;
}

interface BrandingSettings {
  colors?: {
    pageBackground?: string | {
      angleDeg: number;
      end: string;
      start: string;
      type: string;
    };
    primary?: string;
  };
  faviconUrl?: string;
  font?: {url: string;};
  logoUrl?: string;
}

interface BrandingThemes {
  default: {
    borders: Record<string, string | number | boolean>;
    colors: Record<string, string>;
    displayName: string;
    fonts: Record<string, string | boolean | object>;
    pageBackground: Record<string, string>;
    widget: Record<string, string | number>;
  };
}

Methods

The MFA Recovery Code Challenge New Code screen class methods is:

continue( options? )

This method confirms that the user has saved the new recovery code and continues the authentication flow.
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
}
Parameter                 TypeRequiredDescription
[key: string]string | number | boolean | undefinedNoOptional data collected from user.

MFA Recovery Code Enrollment screen class

The MFA Recovery Code Enrollment screen class provides methods associated with the mfa-recovery-code-enrollment screen. This screen displays the MFA recovery code for safe keeping.
Import and instantiate the MFA Recovery Code Enrollment screen class:
import MfaRecoveryCodeEnrollment from '@auth0/auth0-acul-js/mfa-recovery-code-enrollment';

const mfaRecoveryCodeEnrollment = new MfaRecoveryCodeEnrollment();

Properties

The MFA Recovery Code Enrollment screen class properties are:
interface branding {
  settings: null | BrandingSettings;
  themes: null | BrandingThemes;
}

interface BrandingSettings {
  colors?: {
    pageBackground?: string | {
      angleDeg: number;
      end: string;
      start: string;
      type: string;
    };
    primary?: string;
  };
  faviconUrl?: string;
  font?: {url: string;};
  logoUrl?: string;
}

interface BrandingThemes {
  default: {
    borders: Record<string, string | number | boolean>;
    colors: Record<string, string>;
    displayName: string;
    fonts: Record<string, string | boolean | object>;
    pageBackground: Record<string, string>;
    widget: Record<string, string | number>;
  };
}

Methods

The MFA Recovery Code Enrollment screen class methods is:

continue( options? )

This method declares that the user has confirmed that they saved their recovery code and continues to the next screen in the authentication flow.
import MfaRecoveryCodeEnrollment from '@auth0/auth0-acul-js/mfa-recovery-code-enrollment';
const mfaRecoveryCodeEnrollment = new MfaRecoveryCodeEnrollment();

// Declare that the user saved the recovery code
await mfaRecoveryCodeEnrollment.continue();
Parameter                 TypeRequiredDescription
isCodeCopiedbooleanYesThe user confirms to have copied the recovery code.
[key: string]string | number | boolean | undefinedNoOptional data collected from user.