Multi-Factor Authentication Voice screen classes

MFA Voice Challenge screen class

The MFA Voice Challenge screen class provides methods associated with the mfa-voice-challenge screen. This screen is displayed when the user needs to enter a recovery code to verify their identity.

Import and instantiate the MFA Voice Challenge screen class:

import MfaVoiceChallenge from '@auth0/auth0-acul-js/mfa-voice-challenge';
const mfaVoiceChallenge = new MfaVoiceChallenge();

Was this helpful?

/

Properties

The MFA Voice 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 Voice Challenge screen class methods are:

continue( options? )

This method continues the voice challenge flow.

import MfaVoiceChallenge from '@auth0/auth0-acul-js/mfa-voice-challenge';
const mfaVoiceChallenge = new MfaVoiceChallenge();

// Submit the verification code the user received via voice call
mfaVoiceChallenge.continue({
  code: '123456',
  rememberBrowser: true // Optional: to remember this device for 30 days
});

Was this helpful?

/

Parameter                  Type Required Description
code string Yes The code entered by the user.
rememberBrowser boolean No Remember the user's browser configuration.

pickPhone( options ?)

This method redirects the user to a phone selection screen.

const mfaVoiceChallenge = new MfaVoiceChallenge();

// Navigate to the screen for selecting a different phone number
mfaVoiceChallenge.pickPhone();

Was this helpful?

/

resendCode( options ?)

This method requests a new voice call with a verification code.

const mfaVoiceChallenge = new MfaVoiceChallenge();

// Request a new voice call with verification code
mfaVoiceChallenge.resendCode();

Was this helpful?

/

switchToSms( options? )

This method switches the user from voice confirmation to SMS confirmation.

const mfaVoiceChallenge = new MfaVoiceChallenge();

// Switch to SMS verification instead of voice call
mfaVoiceChallenge.switchToSms();

Was this helpful?

/

tryAnotherMethod( options ?)

This method allows the user to request an alternative MFA method.

const mfaVoiceChallenge = new MfaVoiceChallenge();

// Navigate to the screen for selecting an alternative MFA method
mfaVoiceChallenge.tryAnotherMethod();

Was this helpful?

/

MFA Voice Enrollment screen class

The MFA Voice Enrollment screen class provides methods associated with the mfa-voice-enrollment screen. This screen is displayed for a user needs to enter a phone number to receive a voice call with a code to continue enrollment.

Import and instantiate the MFA Voice Enrollment screen class:

import MfaVoiceEnrollment from '@auth0/auth0-acul-js/mfa-voice-enrollment';
const mfaVoiceEnrollment = new MfaVoiceEnrollment();

Was this helpful?

/

Properties

The MFA Voice 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 Voice Enrollment screen class methods are:

continue( options ?)

This method continues the enrollment process.

import MfaVoiceEnrollment from '@auth0/auth0-acul-js/mfa-voice-enrollment';
const mfaVoiceEnrollment = new MfaVoiceEnrollment();

// Call the continue method with a phone number
mfaVoiceEnrollment.continue({
    phone: "1234567890"
});

Was this helpful?

/

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

selectPhoneCountryCode( options ?)

This method allows users to pick their country code.

import MfaVoiceEnrollment from '@auth0/auth0-acul-js/mfa-voice-enrollment';
const mfaVoiceEnrollment = new MfaVoiceEnrollment();

// Call the pickCountryCode method
mfaVoiceEnrollment.selectPhoneCountryCode();

Was this helpful?

/

tryAnotherMethod( options ?)

This method asks users to try SMS if they already tried voice, or vice versa.

import MfaVoiceEnrollment from '@auth0/auth0-acul-js/mfa-voice-enrollment';
const mfaVoiceEnrollment = new MfaVoiceEnrollment();

// Call the tryAnotherMethod
mfaVoiceEnrollment.tryAnotherMethod();

Was this helpful?

/