メインコンテンツへスキップ
MfaSmsChallenge クラスは、mfa-sms-challenge 画面の機能を実装します。この画面は、ユーザーが本人確認のために SMS コードを入力する必要がある場合に表示されます。
MfaSmsChallenge

コンストラクター

MFA SMS Challenge 画面マネージャーのインスタンスを生成します。
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.continueMfaSmsChallenge({
  code: '123456',
  rememberDevice: true,
});

プロパティ

ブランディングテーマや設定など、ブランディング関連の構成を提供します。
mfa-sms-challenge 画面向けの、idnamelogoUrl などのクライアント関連の構成を提供します。
idname など、ユーザーの組織に関する情報を提供します。
認証フロー内の現在のプロンプトに関するデータを含みます。
構成やコンテキストを含む、mfa-sms-challenge 画面固有の詳細を含みます。
id や関連するメタデータなど、テナントに関するデータを含みます。
アクティブな識別子やフローの状態など、mfa-sms-challenge 画面に関するトランザクション固有のデータを提供します。
MFA SMS チャレンジ中のユーザー入力など、SDK に渡される信頼できないデータを扱います。
usernameemailroles など、アクティブなユーザーの詳細を含みます。

メソッド

changeLanguage
Promise<void>
このメソッドは、Universal Login ページの表示言語を変更します。
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
mfaSmsChallenge.changeLanguage({
  language: 'fr',
});
メソッドパラメーター
continueMfaSmsChallenge
Promise<void>
このメソッドは、指定された code を使用して MFA SMS チャレンジを送信します。
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.continueMfaSmsChallenge({
  code: '123456',
  rememberDevice: true,
});
メソッドパラメーター
getACall
Promise<void>
このメソッドは、認証方法を音声通話に切り替えます。
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.getACall();
getErrors
このメソッドは、コンテキストからトランザクションエラーの配列を取得します。エラーが存在しない場合は空の配列を返します。
pickSms
Promise<void>
このメソッドは、ユーザーが別の SMS 番号を選択できる画面に移動します。
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.pickSms();
resendCode
Promise<void>
このメソッドは、SMS 検証 コード をユーザーに再送します。
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.resendCode();
resendManager
このメソッドは、タイムアウトとステータス管理を構成可能な再送機能を提供します。
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
const { startResend } = mfaSmsChallenge.resendManager({
  timeoutSeconds: 15,
  onStatusChange: (remainingSeconds, isDisabled) => {
    console.log(`Resend available in ${remainingSeconds}s, disabled: ${isDisabled}`);
  },
  onTimeout: () => {
    console.log('Resend is now available');
  },
});

startResend();
メソッドパラメーター
tryAnotherMethod
Promise<void>
このメソッドを使用すると、ユーザーは別のMFA方法を試すことができます。
Example
import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.tryAnotherMethod();