メインコンテンツへスキップ
ResetPasswordMfaSmsChallenge クラスは、reset-password-mfa-sms-challenge 画面の機能を実装します。この画面では、パスワードのリセットフロー中の MFA ステップの一環として、SMS で電話に送信された認証コードを入力するようユーザーに求めます。

コンストラクタ

ResetPasswordMfaSmsChallenge スクリーンマネージャーのインスタンスを作成します。
Example
import ResetPasswordMfaSmsChallenge from '@auth0/auth0-acul-js/reset-password-mfa-sms-challenge';
const resetPasswordMfaSmsChallengeManager = new ResetPasswordMfaSmsChallenge();
await resetPasswordMfaSmsChallengeManager.continueMfaSmsChallenge({
  code: '123456',
});

プロパティ

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

メソッド

changeLanguage
Promise<void>
このメソッドは、Universal Login ページの表示言語を変更します。
Example
import ResetPasswordMfaSmsChallenge from '@auth0/auth0-acul-js/reset-password-mfa-sms-challenge';
const resetPasswordMfaSmsChallengeManager = new ResetPasswordMfaSmsChallenge();
resetPasswordMfaSmsChallengeManager.changeLanguage({
  language: 'fr',
});
メソッドパラメーター
continueMfaSmsChallenge
Promise<void>
このメソッドは、パスワードリセットフロー中の MFA チャレンジを続行するために、SMS 認証コードを送信します。
Example
import ResetPasswordMfaSmsChallenge from '@auth0/auth0-acul-js/reset-password-mfa-sms-challenge';
const resetPasswordMfaSmsChallengeManager = new ResetPasswordMfaSmsChallenge();
await resetPasswordMfaSmsChallengeManager.continueMfaSmsChallenge({
  code: '123456',
});
メソッドパラメーター
getACall
Promise<void>
このメソッドは、SMS ではなく音声通話による認証に切り替えます。
Example
import ResetPasswordMfaSmsChallenge from '@auth0/auth0-acul-js/reset-password-mfa-sms-challenge';
const resetPasswordMfaSmsChallengeManager = new ResetPasswordMfaSmsChallenge();
await resetPasswordMfaSmsChallengeManager.getACall();
getErrors
このメソッドは、コンテキストからトランザクションエラーの配列を取得します。エラーがない場合は空の配列を返します。
resendCode
Promise<void>
このメソッドは、ユーザーの電話番号に SMS 認証コードを再送します。
Example
import ResetPasswordMfaSmsChallenge from '@auth0/auth0-acul-js/reset-password-mfa-sms-challenge';
const resetPasswordMfaSmsChallengeManager = new ResetPasswordMfaSmsChallenge();
await resetPasswordMfaSmsChallengeManager.resendCode();
resendManager
このメソッドは、タイムアウトを管理しながら再送機能を提供します。再送を実行する startResend() メソッドを持つ ResendControl オブジェクトを返し、ユーザーが再度再送できるようになるまでクールダウン期間を設けます。
Example
import ResetPasswordMfaSmsChallenge from '@auth0/auth0-acul-js/reset-password-mfa-sms-challenge';
const resetPasswordMfaSmsChallengeManager = new ResetPasswordMfaSmsChallenge();
const { startResend } = resetPasswordMfaSmsChallengeManager.resendManager({
  timeoutSeconds: 15,
  onStatusChange: (remainingSeconds, isDisabled) => {
    console.log(`Resend available in ${remainingSeconds}s, disabled: ${isDisabled}`);
  },
  onTimeout: () => {
    console.log('Resend is now available');
  }
});

// ユーザーが再送ボタンをクリックしたときに startResend を呼び出す
startResend();
メソッドのパラメーター
tryAnotherMethod
Promise<void>
このメソッドを使用すると、ユーザーはチャレンジを完了するために別の MFA 方法を選択できます。
Example
import ResetPasswordMfaSmsChallenge from '@auth0/auth0-acul-js/reset-password-mfa-sms-challenge';
const resetPasswordMfaSmsChallengeManager = new ResetPasswordMfaSmsChallenge();
await resetPasswordMfaSmsChallengeManager.tryAnotherMethod();