メインコンテンツへスキップ
ResetPasswordMfaWebAuthnRoamingChallenge クラスは、reset-password-mfa-webauthn-roaming-challenge 画面の機能を実装します。この画面では、パスワードリセットフロー中の MFA ステップの一環として、ローミングセキュリティキー (FIDO2 USB キーなど) を使用して本人確認を行うようユーザーに求めます。

コンストラクター

ResetPasswordMfaWebAuthnRoamingChallenge 画面マネージャーのインスタンスを作成します。
Example
import ResetPasswordMfaWebAuthnRoamingChallenge from '@auth0/auth0-acul-js/reset-password-mfa-webauthn-roaming-challenge';
const resetPasswordMfaWebAuthnRoamingChallengeManager = new ResetPasswordMfaWebAuthnRoamingChallenge();
try {
  await resetPasswordMfaWebAuthnRoamingChallengeManager.useSecurityKey({
    rememberDevice: true,
  });
} catch (error) {
  if (error instanceof DOMException) {
    await resetPasswordMfaWebAuthnRoamingChallengeManager.showError({
      error: { name: error.name, message: error.message },
    });
  }
}

プロパティ

ブランディングテーマや設定など、ブランディングに関する構成を提供します。
reset-password-mfa-webauthn-roaming-challenge 画面に対して、idnamelogoUrl などのクライアント関連の構成を提供します。
idname など、ユーザーの組織に関する情報を提供します。
認証フローにおける現在のプロンプトに関するデータを含みます。
構成やコンテキストなど、reset-password-mfa-webauthn-roaming-challenge 画面に固有の詳細を含みます。
id や関連するメタデータなど、テナントに関するデータを含みます。
アクティブな識別子やフローの状態など、reset-password-mfa-webauthn-roaming-challenge 画面のトランザクション固有のデータを提供します。
MFA チャレンジフロー中のユーザー入力など、SDK に渡される信頼できないデータを扱います。
usernameemailroles など、アクティブなユーザーの詳細を含みます。

メソッド

changeLanguage
Promise<void>
このメソッドは、Universal Login ページの表示言語を変更します。
Example
import ResetPasswordMfaWebAuthnRoamingChallenge from '@auth0/auth0-acul-js/reset-password-mfa-webauthn-roaming-challenge';
const resetPasswordMfaWebAuthnRoamingChallengeManager = new ResetPasswordMfaWebAuthnRoamingChallenge();
resetPasswordMfaWebAuthnRoamingChallengeManager.changeLanguage({
  language: 'fr',
});
メソッドのパラメーター
getErrors
このメソッドは、コンテキストからトランザクションエラーの配列を取得します。エラーがない場合は空の配列を返します。
showError
Promise<void>
このメソッドは、ユーザーによるキャンセル (NotAllowedError) や navigator.credentials.get() の timeout など、ブラウザー側の WebAuthn エラーを Auth0 に報告します。
Example
import ResetPasswordMfaWebAuthnRoamingChallenge from '@auth0/auth0-acul-js/reset-password-mfa-webauthn-roaming-challenge';
const resetPasswordMfaWebAuthnRoamingChallengeManager = new ResetPasswordMfaWebAuthnRoamingChallenge();
await resetPasswordMfaWebAuthnRoamingChallengeManager.showError({
  error: { name: error.name, message: error.message },
});
メソッドのパラメーター
tryAnotherMethod
Promise<void>
このメソッドを使用すると、ユーザーは別の MFA方式 を選択してチャレンジを完了できます。
Example
import ResetPasswordMfaWebAuthnRoamingChallenge from '@auth0/auth0-acul-js/reset-password-mfa-webauthn-roaming-challenge';
const resetPasswordMfaWebAuthnRoamingChallengeManager = new ResetPasswordMfaWebAuthnRoamingChallenge();
await resetPasswordMfaWebAuthnRoamingChallengeManager.tryAnotherMethod();
メソッドのパラメーター
useSecurityKey
Promise<void>
このメソッドは、WebAuthn のセキュリティキー チャレンジを開始し、生成された認証情報を送信して、パスワードリセットフロー中の MFA ステップを完了します。ブラウザーが DOMException をスローした場合 (ユーザーによるキャンセルなど) は、エラーをキャッチして showError を呼び出し、Auth0 に通知してください。
Example
import ResetPasswordMfaWebAuthnRoamingChallenge from '@auth0/auth0-acul-js/reset-password-mfa-webauthn-roaming-challenge';
const resetPasswordMfaWebAuthnRoamingChallengeManager = new ResetPasswordMfaWebAuthnRoamingChallenge();
try {
  await resetPasswordMfaWebAuthnRoamingChallengeManager.useSecurityKey({
    rememberDevice: true,
  });
} catch (error) {
  if (error instanceof DOMException) {
    await resetPasswordMfaWebAuthnRoamingChallengeManager.showError({
      error: { name: error.name, message: error.message },
    });
  }
}
メソッドパラメーター