メインコンテンツへスキップ
mfa-email-challenge 画面の機能を実装するクラスです この画面は、MFA(多要素認証)の途中でユーザーがメールアドレスを確認する必要がある場合に表示されます
Example
import MfaEmailChallenge from '@auth0/auth0-acul-js/mfa-email-challenge';

const mfaEmailChallenge = new MfaEmailChallenge();
await mfaEmailChallenge.continue({
  code: '123456',
  rememberDevice: true
});

コンストラクター

MfaEmailChallenge
Constructor
MfaEmailChallenge 画面マネージャーのインスタンスを作成します

プロパティ

branding
client
organization
prompt
screen
tenant
transaction
untrustedData
user
screenIdentifier
string

メソッド

continue
Promise<void>
指定されたコードを使用してメールチャレンジを続行します。
Example
import MfaEmailChallenge from '@auth0/auth0-acul-js/mfa-email-challenge';

const mfaEmailChallenge = new MfaEmailChallenge();
await mfaEmailChallenge.continue({
  code: '123456',
  rememberDevice: true
});
getErrors
コンテキストからトランザクションエラーの配列を取得し、存在しない場合は空の配列を返します。トランザクションコンテキストから取得されるエラーオブジェクトの配列です。
pickEmail
Promise<void>
利用可能な場合、別のメール設定を選択するアクションを送信します。
Example
import MfaEmailChallenge from '@auth0/auth0-acul-js/mfa-email-challenge';

const mfaEmailChallenge = new MfaEmailChallenge();
await mfaEmailChallenge.pickEmail();
resendCode
Promise<void>
メールコードを再送信します。
Example
import MfaEmailChallenge from '@auth0/auth0-acul-js/mfa-email-challenge';

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

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

// Call startResend when user clicks resend button
startResend();
tryAnotherMethod
Promise<void>
ユーザーが別の MFA(多要素認証)方法を試せるようにします。
Example
import MfaEmailChallenge from '@auth0/auth0-acul-js/mfa-email-challenge';

const mfaEmailChallenge = new MfaEmailChallenge();
await mfaEmailChallenge.tryAnotherMethod();