メインコンテンツへスキップ
mfa-country-codes 画面の機能を実装するクラスです この画面では、ユーザーが MFA(多要素認証)の電話番号認証に使用する国番号を選択できます
Example
import MfaCountryCodes from '@auth0/auth0-acul-js/mfa-country-codes';

const mfaCountryCodes = new MfaCountryCodes();

// 利用可能な国コードと電話番号のプレフィックスを取得
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',
});

コンストラクター

MfaCountryCodes
Constructor
MfaCountryCodes 画面マネージャーのインスタンスを生成します

プロパティ

branding
client
organization
prompt
screen
tenant
transaction
untrustedData
user
screenIdentifier
string

メソッド

getErrors
コンテキストからトランザクションのエラー配列を取得します。存在しない場合は空の配列を返します。トランザクションコンテキストから取得されるエラーオブジェクトの配列です。
goBack
Promise<void>
前の画面に戻ります。
Example
import MfaCountryCodes from '@auth0/auth0-acul-js/mfa-country-codes';

const mfaCountryCodes = new MfaCountryCodes();
await mfaCountryCodes.goBack();
selectCountryCode
Promise<void>
利用可能なオプションから国コードを選択します。
Example
import MfaCountryCodes from '@auth0/auth0-acul-js/mfa-country-codes';

const mfaCountryCodes = new MfaCountryCodes();

// 利用可能な国コードと電話番号プレフィックスを取得
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',
});