Multi-Factor Authentication Email screen classes

MFA Email Challenge screen class

The MFA Email Challenge screen class allows users to verify their email address using MFA.

Import and instantiate the MFA Email Challenge screen class:

import MfaEmailChallenge from '@auth0/auth0-acul-js/mfa-email-challenge';
const mfaEmailChallengeManager = new MfaEmailChallenge();

// SDK Properties return a string, number or boolean
// ex. "login-id"
mfaDetectBrowserCapabilitiesManager.screen.name;

// SDK Methods return an object or array
// ex. { signup: "/signup_url", reset_password: "/reset_password_url"} 
await mfaEmailChallenge.continue({
  code: '123456',
   rememberDevice: true
});

Was this helpful?

/

Properties

The MFA Email 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 Email Challenge screen class method are:

continue( options ?)

This method continues with the email challenge using the provided code.

import MfaEmailChallenge from '@auth0/auth0-acul-js/mfa-email-challenge';

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

Was this helpful?

/

Parameter                  Type Required Description
code string yes Code entered by user.
rememberDevice boolean No Remember user's device.
[key: string] string | number | boolean | undefined No Optional data collected from user.

pickEmail( options ?)

This method allows the user to select other emails, if available.

import MfaEmailChallenge from '@auth0/auth0-acul-js/mfa-email-challenge';

const mfaEmailChallenge = new MfaEmailChallenge();
await mfaEmailChallenge.pickEmail();

Was this helpful?

/

Parameter                  Type Required Description
[key: string] string | number | boolean | undefined No Optional data collected from user.

resendCode( options ?)

This method resends email code.

import MfaEmailChallenge from '@auth0/auth0-acul-js/mfa-email-challenge';

const mfaEmailChallenge = new MfaEmailChallenge();
await mfaEmailChallenge.resendCode();

Was this helpful?

/

Parameter                  Type Required Description
[key: string] string | number | boolean | undefined No Optional data collected from user.

tryAnotherMethod( options ?)

This method allows the user to select another MFA option.

import MfaEmailChallenge from '@auth0/auth0-acul-js/mfa-email-challenge';

const mfaEmailChallenge = new MfaEmailChallenge();
await mfaEmailChallenge.tryAnotherMethod();

Was this helpful?

/

Parameter                  Type Required Description
[key: string] string | number | boolean | undefined No Optional data collected from user.

MFA Email List screen class

The MFA Email List screen class allows users to select an enrolled email address for MFA.

Import and instantiate the MFA Email List screen class:

import MfaEmailList from '@auth0/auth0-acul-js/mfa-email-list';
const mfaEmailList = new MfaEmailList();

// SDK Properties return a string, number or boolean
// ex. "login-id"
mfaEmailList.screen.name;

// SDK Methods return an object or array
await mfaEmailList.selectMfaEmail({
index: 0 // for demonstration we are selecting the first index
});

Was this helpful?

/

Properties

The MFA Email List 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 Email List screen class method are:

goBack( options ?)

This method allows the user to navigate to previous screen.

import MfaEmailList from '@auth0/auth0-acul-js/mfa-email-list';

const mfaEmailList = new MfaEmailList();
await mfaEmailList.goBack();

Was this helpful?

/

Parameter                  Type Required Description
[key: string] string | number | boolean | undefined No Optional data collected from user.

selectMfaEmail( options ?)

This method allows the user to select from a list of enrolled email address.

import MfaEmailList from '@auth0/auth0-acul-js/mfa-email-list';

const mfaEmailList = new MfaEmailList();
await mfaEmailList.selectMfaEmail({
  index: 0 // for demonstration we are selecting the first index
});

Was this helpful?

/

Parameter                  Type Required Description
index number Yes The index of the email address to select.
[key: string] string | number | boolean | undefined No Optional data collected from user.