mfa-country-codes 画面の機能を実装するクラスです
この画面では、ユーザーが MFA(多要素認証)の電話番号認証に使用する国番号を選択できます
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 画面マネージャーのインスタンスを生成します
コンテキストからトランザクションのエラー配列を取得します。存在しない場合は空の配列を返します。トランザクションコンテキストから取得されるエラーオブジェクトの配列です。
前の画面に戻ります。import MfaCountryCodes from '@auth0/auth0-acul-js/mfa-country-codes';
const mfaCountryCodes = new MfaCountryCodes();
await mfaCountryCodes.goBack();
リクエストに含める省略可能なカスタムオプションです。
利用可能なオプションから国コードを選択します。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',
});
国コード選択アクションを含むオプションです。プロパティ電話番号プレフィックス(例: ‘+1’, ‘+44’)