Creates an instance of MfaWebAuthnRoamingEnrollment screen manager.
Static
screenInitiates the WebAuthn credential creation and submits the result to the server. This corresponds to the user interacting with the FIDO Security Keys prompt.
Optional custom options to include with the request.
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 ... */ };
await webauthnEnrollment.enroll({ response: JSON.stringify(credentialResponse) });
Submits details about a WebAuthn browser error to the server. This is used when the browser's WebAuthn API encounters an error.
The options containing the error details.
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.',
},
});
Allows the user to try another MFA method. This corresponds to the "Try Another Method" button.
Optional
payload: Classes.MfaWebAuthnRoamingEnrollmentTryAnotherMethodOptionsOptional custom options to include with the request.
Class implementing the mfa-webauthn-roaming-enrollment screen functionality. This screen is displayed when a user needs to enroll a WebAuthn roaming authenticator (like a security key).