Skip to main content
Class implementing the mfa-country-codes screen functionality This screen allows users to select a country code for MFA phone number verification
Example
import MfaCountryCodes from '@auth0/auth0-acul-js/mfa-country-codes';

const mfaCountryCodes = new MfaCountryCodes();

// Get the available country codes and phone prefixes
const { screen } = mfaCountryCodes;
const { phone_prefixes } = screen.data
const {country_code, phone_prefix} = phone_prefixes[0]

await mfaCountryCodes.selectCountryCode({
  country_code: 'US',
  phone_prefix: '+1',
});

Constructors

MfaCountryCodes
Constructor
Creates an instance of MfaCountryCodes screen manager

Properties

branding
client
organization
prompt
screen
tenant
transaction
untrustedData
user
screenIdentifier
string

Methods

getErrors
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.
goBack
Promise<void>
Navigates back to the previous screen
Example
import MfaCountryCodes from '@auth0/auth0-acul-js/mfa-country-codes';

const mfaCountryCodes = new MfaCountryCodes();
await mfaCountryCodes.goBack();
selectCountryCode
Promise<void>
Selects a country code from the available options
Example
import MfaCountryCodes from '@auth0/auth0-acul-js/mfa-country-codes';

const mfaCountryCodes = new MfaCountryCodes();

// Get the available country codes and phone prefixes
const { screen } = mfaCountryCodes;
const { phone_prefixes } = screen.data
const {country_code, phone_prefix} = phone_prefixes[0]

await mfaCountryCodes.selectCountryCode({
  country_code: 'US',
  phone_prefix: '+1',
});