メインコンテンツへスキップ
MFA(多要素認証)の音声チャレンジ画面の実装です。 この画面は、ユーザーが多要素認証フローの一環として音声通話で 本人確認を行う必要がある場合に表示されます。
Example
const mfaVoiceChallenge = new MfaVoiceChallenge();
mfaVoiceChallenge.continue({
  code: '123456',
  rememberDevice: true
});

コンストラクター

MfaVoiceChallenge
Constructor
MfaVoiceChallenge のインスタンスを作成します。

プロパティ

branding
client
organization
prompt
screen
画面固有のプロパティとデータ。
tenant
transaction
untrustedData
user
screenIdentifier
string
検証およびテレメトリのための画面識別子

メソッド

continue
Promise<void>
MFA(多要素認証)チャレンジを検証するために、音声通話で受信した認証コードを送信します。コードが正常に検証されると解決される Promise です。
Example
const mfaVoiceChallenge = new MfaVoiceChallenge();
mfaVoiceChallenge.continue({
  code: '123456',
  rememberDevice: true
});
getErrors
コンテキストからトランザクションエラーの配列を取得します。存在しない場合は空の配列を返します。トランザクションコンテキストからのエラーオブジェクトの配列です。
pickPhone
Promise<void>
別の電話番号を選択するための画面に遷移します。画面遷移が完了すると解決される Promise です。
Example
const mfaVoiceChallenge = new MfaVoiceChallenge();
mfaVoiceChallenge.pickPhone();
resendCode
Promise<void>
認証コード付きの新しい音声通話を要求します。新しいコードが送信されると解決される Promise です。
Example
const mfaVoiceChallenge = new MfaVoiceChallenge();
mfaVoiceChallenge.resendCode();
resendManager
ユーティリティ機能この画面用の、タイムアウト管理付きの再送機能を取得します。startResend メソッドを持つ ResendControl オブジェクトです。
Example
import MfaVoiceChallenge from '@auth0/auth0-acul-js/mfa-voice-challenge';

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

// ユーザーが再送ボタンをクリックしたときに startResend を呼び出します
startResend();
switchToSms
Promise<void>
音声通話ではなく、SMS による認証方法に切り替えます。切り替えが完了すると解決される Promise です。
Example
const mfaVoiceChallenge = new MfaVoiceChallenge();
mfaVoiceChallenge.switchToSms();
tryAnotherMethod
Promise<void>
別の MFA(多要素認証)手段を選択する画面へ遷移します。画面遷移が完了すると解決される Promise です。
Example
const mfaVoiceChallenge = new MfaVoiceChallenge();
mfaVoiceChallenge.tryAnotherMethod();