Class implementing the mfa-country-codes screen functionality This screen allows users to select a country code for MFA phone number verification

Hierarchy

  • BaseContext
    • MfaCountryCodes

Implements

Constructors

Properties

branding: BrandingMembers
organization: OrganizationMembers
transaction: TransactionMembers
untrustedData: UntrustedDataMembers
screenIdentifier: string = ScreenIds.MFA_COUNTRY_CODES

Methods

  • Navigates back to the previous screen

    Parameters

    • Optionalpayload: CustomOptions

      Optional custom options to include with the request

    Returns Promise<void>

    import MfaCountryCodes from '@auth0/auth0-acul-js/mfa-country-codes';

    const mfaCountryCodes = new MfaCountryCodes();
    await mfaCountryCodes.goBack();
  • Selects a country code from the available options

    Parameters

    Returns Promise<void>

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