メインコンテンツへスキップ
mfa-webauthn-roaming-enrollment 画面の機能を実装するクラスです。 この画面は、ユーザーが WebAuthn ローミング認証器(セキュリティキーなど)を登録する必要がある場合に表示されます。
Example
import MfaWebAuthnRoamingEnrollment from '@auth0/auth0-acul-js/mfa-webauthn-roaming-enrollment';

const webauthnEnrollment = new MfaWebAuthnRoamingEnrollment();
// WebAuthn 認証情報レスポンスを取得済みであることを想定しています(例: navigator.credentials.create から)
const credentialResponse = { /* ... シリアル化された認証情報 ... */ };
await webauthnEnrollment.enroll({ response: JSON.stringify(credentialResponse) });

コンストラクター

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

プロパティ

branding
client
organization
prompt
screen
tenant
transaction
untrustedData
user
screenIdentifier
string

メソッド

enroll
Promise<void>
WebAuthn クレデンシャルの作成を開始し、その結果をサーバーに送信します。 これは、ユーザーが FIDO セキュリティキーのプロンプトで操作を行うことに相当します。
Example
import MfaWebAuthnRoamingEnrollment from '@auth0/auth0-acul-js/mfa-webauthn-roaming-enrollment';

const webauthnEnrollment = new MfaWebAuthnRoamingEnrollment();
// Assuming you have obtained the WebAuthn credential response (e.g., from navigator.credentials.create)
const credentialResponse = { /* ... serialized credential ... *&#x2F; };
await webauthnEnrollment.enroll({ response: JSON.stringify(credentialResponse) });
getErrors
コンテキストからトランザクションエラーの配列を取得します。存在しない場合は空の配列を返します。トランザクションコンテキストから取得されるエラーオブジェクトの配列です。
showError
Promise<void>
WebAuthn ブラウザーエラーの詳細をサーバーに送信します。 これは、ブラウザーの WebAuthn API でエラーが発生した場合に使用されます。
Example
import MfaWebAuthnRoamingEnrollment from '@auth0/auth0-acul-js/mfa-webauthn-roaming-enrollment';

const webauthnEnrollment = new MfaWebAuthnRoamingEnrollment();
await webauthnEnrollment.showError({
  error: {
    name: 'NotAllowedError',
    message: 'The operation either timed out or was not allowed.',
  },
});
tryAnotherMethod
Promise<void>
ユーザーが別の MFA(多要素認証)手段を試せるようにします。 これは「Try Another Method」ボタンに対応します。
Example
import MfaWebAuthnRoamingEnrollment from '@auth0/auth0-acul-js/mfa-webauthn-roaming-enrollment';

const webauthnEnrollment = new MfaWebAuthnRoamingEnrollment();
await webauthnEnrollment.tryAnotherMethod();