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

コンストラクター

ResetPasswordMfaVoiceChallenge画面マネージャーのインスタンスを作成します。
Example
import ResetPasswordMfaVoiceChallenge from '@auth0/auth0-acul-js/reset-password-mfa-voice-challenge';
const resetPasswordMfaVoiceChallengeManager = new ResetPasswordMfaVoiceChallenge();
await resetPasswordMfaVoiceChallengeManager.continue({ code: '123456' });

プロパティ

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

メソッド

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

// ユーザーが再送ボタンをクリックしたときに startResend を呼び出します
startResend();
メソッドのパラメーター
switchToSms
Promise<void>
このメソッドは、ユーザーを音声通話ではなくSMS認証に切り替えます。
Example
import ResetPasswordMfaVoiceChallenge from '@auth0/auth0-acul-js/reset-password-mfa-voice-challenge';
const resetPasswordMfaVoiceChallengeManager = new ResetPasswordMfaVoiceChallenge();
await resetPasswordMfaVoiceChallengeManager.switchToSms();
tryAnotherMethod
Promise<void>
このメソッドを使用すると、ユーザーはチャレンジを完了するための別のMFA方式を選択できます。
Example
import ResetPasswordMfaVoiceChallenge from '@auth0/auth0-acul-js/reset-password-mfa-voice-challenge';
const resetPasswordMfaVoiceChallengeManager = new ResetPasswordMfaVoiceChallenge();
await resetPasswordMfaVoiceChallengeManager.tryAnotherMethod();