Multi-Factor Authentication Recovery Code screen classes

MFA Recovery Code Challenge screen class

The MFA 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();

Was this helpful?

/

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>;
  };
}

Was this helpful?

/

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',
});

Was this helpful?

/

Parameter                  Type Required Description
code string Yes The code entered by the 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();

Was this helpful?

/

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();

Was this helpful?

/

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>;
  };
}

Was this helpful?

/

Methods

The MFA Recovery Code Enrollment screen class methods are:

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();

Was this helpful?

/

Parameter                  Type Required Description
isCodeCopied boolean Yes The user confirms to have copied the recovery code.