EmailIdentifierChallenge クラスは、email-identifier-challenge 画面の機能を実装します。この画面では、本人確認のためにメールアドレスに送信された確認コードを入力するようユーザーに求めます。
EmailIdentifierChallenge画面マネージャーのインスタンスを作成します:
import EmailIdentifierChallenge from '@auth0/auth0-acul-js/email-identifier-challenge' ;
const emailIdentifierChallengeManager = new EmailIdentifierChallenge ();
await emailIdentifierChallengeManager . submitEmailChallenge ({ code: 'your-code' });
ブランディングテーマや設定など、ブランディングに関する構成を提供します。
email-identifier-challenge 画面向けの、id、name、logoUrl などのクライアント関連の構成を提供します。
id や name など、ユーザーの組織に関する情報を提供します。
認証フロー内の現在のプロンプトに関するデータを含みます。
構成やコンテキストなど、email-identifier-challenge 画面に固有の詳細を含みます。
id や関連するメタデータなど、テナントに関するデータを含みます。
アクティブな識別子やフローの状態など、email-identifier-challenge 画面に関するトランザクション固有のデータを提供します。
メールアドレスチャレンジフロー中のユーザー入力など、SDK に渡される信頼できないデータを扱います。
username、email、roles など、現在のユーザーの詳細です。
このメソッドは、Universal Login ページの表示言語を変更します。 import EmailIdentifierChallenge from '@auth0/auth0-acul-js/email-identifier-challenge' ;
const emailIdentifierChallengeManager = new EmailIdentifierChallenge ();
emailIdentifierChallengeManager . changeLanguage ({
language: 'fr' ,
});
メソッドパラメーター 使用する言語のロケールコードです (例: 'en'、'fr'、'es') 。
'session' に設定すると、選択した言語はセッション中保持されます。
このメソッドは、コンテキストからトランザクションエラーの配列を取得します。エラーがない場合は空の配列を返します。
このメソッドは、確認コードをユーザーのメールアドレスに再送します。 import EmailIdentifierChallenge from '@auth0/auth0-acul-js/email-identifier-challenge' ;
const emailIdentifierChallengeManager = new EmailIdentifierChallenge ();
await emailIdentifierChallengeManager . resendCode ();
このメソッドは、タイムアウト管理付きの再送機能を提供します。再送を実行する startResend() メソッドを持つ ResendControl オブジェクトを返し、ユーザーが再送できるようになるまでクールダウン期間を適用します。 import EmailIdentifierChallenge from '@auth0/auth0-acul-js/email-identifier-challenge' ;
const emailIdentifierChallengeManager = new EmailIdentifierChallenge ();
const { startResend } = emailIdentifierChallengeManager . resendManager ({
timeoutSeconds: 15 ,
});
await startResend ();
メソッドパラメーター ユーザーが確認コードを再送できるようになるまでのクールダウン時間 (秒) です。
再送ステータスが変化するたびに呼び出されるコールバックです。残り秒数と、再送機能が現在無効かどうかを返します。
クールダウンが終了して再送が再び可能になったときに呼び出されるコールバックです。
このメソッドは、ユーザーを前の画面に戻します。 import EmailIdentifierChallenge from '@auth0/auth0-acul-js/email-identifier-challenge' ;
const emailIdentifierChallengeManager = new EmailIdentifierChallenge ();
await emailIdentifierChallengeManager . returnToPrevious ();
このメソッドは、チャレンジを完了するためにメール確認コードを送信します。 import EmailIdentifierChallenge from '@auth0/auth0-acul-js/email-identifier-challenge' ;
const emailIdentifierChallengeManager = new EmailIdentifierChallenge ();
await emailIdentifierChallengeManager . submitEmailChallenge ({ code: 'your-code' });
メソッドパラメーター ユーザーのメールアドレスに送信された確認コードです。
このテナントで CAPTCHA が有効な場合の CAPTCHA 応答トークンです。