メインコンテンツへスキップ
EmailOTPChallenge クラスは、email-otp-challenge 画面の機能を実装します。この画面では、メールアドレスに送信されたワンタイムパスコードの入力をユーザーに求めます。

コンストラクター

EmailOTPChallenge画面マネージャーのインスタンスを作成します:
Example
import EmailOTPChallenge from '@auth0/auth0-acul-js/email-otp-challenge';
const emailOTPChallengeManager = new EmailOTPChallenge();
await emailOTPChallengeManager.submitCode({ code: '123456' });

プロパティ

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

メソッド

changeLanguage
Promise<void>
このメソッドは、Universal Login ページの表示言語を変更します。
Example
import EmailOTPChallenge from '@auth0/auth0-acul-js/email-otp-challenge';
const emailOTPChallengeManager = new EmailOTPChallenge();
emailOTPChallengeManager.changeLanguage({
  language: 'fr',
});
メソッドパラメーター
getErrors
このメソッドは、コンテキストからトランザクションエラーの配列を取得します。エラーが存在しない場合は、空の配列を返します。
resendCode
Promise<void>
このメソッドは、新しい OTP コードをユーザーのメールアドレスに送信するようリクエストします。
Example
import EmailOTPChallenge from '@auth0/auth0-acul-js/email-otp-challenge';
const emailOTPChallengeManager = new EmailOTPChallenge();
await emailOTPChallengeManager.resendCode();
resendManager
このメソッドは、タイムアウト管理付きの再送機能を提供します。再送を実行し、ユーザーが再度再送できるようになるまでクールダウン期間を適用する startResend() メソッドを持つ ResendControl オブジェクトを返します。
Example
import EmailOTPChallenge from '@auth0/auth0-acul-js/email-otp-challenge';
const emailOTPChallengeManager = new EmailOTPChallenge();
const { startResend } = emailOTPChallengeManager.resendManager({
  timeoutSeconds: 15,
});
await startResend();
メソッドパラメーター
submitCode
Promise<void>
このメソッドは、ユーザーが入力した OTP コードを送信します。
Example
import EmailOTPChallenge from '@auth0/auth0-acul-js/email-otp-challenge';
const emailOTPChallengeManager = new EmailOTPChallenge();
await emailOTPChallengeManager.submitCode({ code: '123456' });
メソッドパラメーター