Skip to main content
MfaWebAuthnPlatformEnrollment
Example

Constructors

Constructor
Initializes a new instance of the MfaWebAuthnPlatformEnrollment class.

Throws

If the Universal Login Context is not available or if the screen name in the context does not match MfaWebAuthnPlatformEnrollment.screenIdentifier.

Properties

string
static

Methods

Retrieves the array of transaction errors from the context, or an empty array if none exist.An array of error objects from the transaction context.
Promise<void>
Allows the user to refuse WebAuthn platform enrollment on the current device.A promise that resolves upon successful submission of the refusal action.
Promise<void>
Reports a browser-side error encountered during the WebAuthn navigator.credentials.create() operation.A promise that resolves upon successful submission of the error report.

Throws

Throws an error if the form submission fails.
Promise<void>
Allows the user to choose to snooze the WebAuthn platform enrollment.A promise that resolves upon successful submission of the snooze action.
Promise<void>
Initiates the WebAuthn platform credential creation process using the public key options available on this.screen.publicKey and submits the resulting credential to the server. This method internally calls createPasskeyCredentials (which wraps navigator.credentials.create()).A promise that resolves when the credential is successfully created and submitted.

Throws

Throws an error if this.screen.publicKey is not available, if createPasskeyCredentials fails (e.g., user cancellation, hardware issues), or if the submission to the server fails.
Example