メインコンテンツへスキップ
Email OTP チャレンジ画面を表します。
Example
import EmailOTPChallenge from '@auth0/auth0-acul-js/email-otp-challenge';

const emailOTPChallenge = new EmailOTPChallenge();
emailOTPChallenge.submitCode({
  code: '123456',
});

コンストラクター

EmailOTPChallenge
Constructor

プロパティ

branding
client
organization
prompt
screen
tenant
transaction
untrustedData
user
screenIdentifier
string

メソッド

getErrors
コンテキストからトランザクションのエラー配列を取得します。存在しない場合は空配列を返します。トランザクションコンテキストに含まれるエラーオブジェクトの配列です。
resendCode
Promise<void>
ユーザーのメールに送信する新しい One‑Time Password (OTP) コードをリクエストします。
Example
import EmailOTPChallenge from '@auth0/auth0-acul-js/email-otp-challenge';

const emailOTPChallenge = new EmailOTPChallenge();
emailOTPChallenge.resendCode();
resendManager
Utility Featureこの画面用の、タイムアウト管理付き再送機能を取得します。startResend メソッドを持つ ResendControl オブジェクトです。
Example
import EmailOTPChallenge from '@auth0/auth0-acul-js/email-otp-challenge';

const emailOTPChallenge = new EmailOTPChallenge();
const { startResend } = emailOTPChallenge.resendManager({
  timeoutSeconds: 15,
  onStatusChange: (remainingSeconds, isDisabled) => {
    console.log(`Resend available in ${remainingSeconds}s, disabled: ${isDisabled}`);
  },
  onTimeout: () => {
    console.log('Resend is now available');
  }
});

// ユーザーが再送ボタンをクリックしたときに startResend を呼び出します
startResend();
submitCode
Promise<void>
ユーザーが入力した OTP コードを送信します。
Example
import EmailOTPChallenge from '@auth0/auth0-acul-js/email-otp-challenge';

const emailOTPChallenge = new EmailOTPChallenge();
emailOTPChallenge.submitCode({
  code: '123456',
});