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

コンストラクター

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

プロパティ

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

メソッド

changeLanguage
Promise<void>
このメソッドは、Universal Login ページの表示言語を変更します。
Example
import ResetPasswordMfaEmailChallenge from '@auth0/auth0-acul-js/reset-password-mfa-email-challenge';
const resetPasswordMfaEmailChallengeManager = new ResetPasswordMfaEmailChallenge();
resetPasswordMfaEmailChallengeManager.changeLanguage({
  language: 'fr',
});
メソッド パラメーター
continue
Promise<void>
このメソッドは、パスワードリセットフロー中の MFA チャレンジを続行するために、メールアドレスに送信された確認コードを送信します。
Example
import ResetPasswordMfaEmailChallenge from '@auth0/auth0-acul-js/reset-password-mfa-email-challenge';
const resetPasswordMfaEmailChallengeManager = new ResetPasswordMfaEmailChallenge();
await resetPasswordMfaEmailChallengeManager.continue({
  code: '123456',
});
メソッド パラメーター
getErrors
このメソッドは、コンテキストからトランザクションエラーの配列を取得します。エラーが存在しない場合は空の配列を返します。
resendCode
Promise<void>
このメソッドは、確認コードをユーザーのメールアドレスに再送します。
Example
import ResetPasswordMfaEmailChallenge from '@auth0/auth0-acul-js/reset-password-mfa-email-challenge';
const resetPasswordMfaEmailChallengeManager = new ResetPasswordMfaEmailChallenge();
await resetPasswordMfaEmailChallengeManager.resendCode();
resendManager
このメソッドは、reset-password-mfa-email-challenge 画面で、タイムアウト管理付きの再送機能を提供します。
Example
import ResetPasswordMfaEmailChallenge from '@auth0/auth0-acul-js/reset-password-mfa-email-challenge';
const resetPasswordMfaEmailChallengeManager = new ResetPasswordMfaEmailChallenge();
const { startResend } = resetPasswordMfaEmailChallengeManager.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 ResetPasswordMfaEmailChallenge from '@auth0/auth0-acul-js/reset-password-mfa-email-challenge';
const resetPasswordMfaEmailChallengeManager = new ResetPasswordMfaEmailChallenge();
await resetPasswordMfaEmailChallengeManager.tryAnotherMethod();