メインコンテンツへスキップ
MFA(多要素認証)のリカバリーコードチャレンジ画面の機能を実装するクラスです。
Example
import MfaRecoveryCodeChallenge from '@auth0/auth0-acul-js/mfa-recovery-code-challenge';
const mfaRecoveryCodeChallengeManager = new MfaRecoveryCodeChallenge();
const handleContinueEnrollment = async () => {
 try {
   await mfaRecoveryCodeChallengeManager.continue('YOUR_RECOVERY_CODE');
 } catch (error) {
   console.error('リカバリーコードでの続行エラー:', error);
 }
}

コンストラクター

MfaRecoveryCodeChallenge
Constructor
MfaRecoveryCodeChallenge 画面のインスタンスを作成します。

プロパティ

branding
client
organization
prompt
screen
tenant
transaction
untrustedData
user
screenIdentifier
string

メソッド

continue
Promise<void>
指定されたリカバリーコードで続行します。
Example
import MfaRecoveryCodeChallenge from '@auth0/auth0-acul-js/mfa-recovery-code-challenge';
const mfaRecoveryCodeChallengeManager = new MfaRecoveryCodeChallenge();
const handleContinueEnrollment = async () => {
 try {
   await mfaRecoveryCodeChallengeManager.continue('YOUR_RECOVERY_CODE');
 } catch (error) {
   console.error('Error continuing with recovery code:', error);
 }
}
getErrors
コンテキストからトランザクションエラーの配列を取得し、エラーが存在しない場合は空の配列を返します。トランザクションコンテキストから取得されるエラーオブジェクトの配列です。
tryAnotherMethod
Promise<void>
ユーザーが別の MFA(多要素認証)手段を選択できる画面に移動します。
Example
import MfaRecoveryCodeChallenge from '@auth0/auth0-acul-js/mfa-recovery-code-challenge';
const mfaRecoveryCodeChallengeManager = new MfaRecoveryCodeChallenge();
const switchAuthenticator = async () => {
 try {
   await mfaRecoveryCodeChallengeManager.tryAnotherMethod();
   console.log('Switched to another authentication method.');
 } catch (error) {
   console.error('Error switching authenticator:', error);
 }
};