Registration
Utility functions and types for WebAuthn registration ceremonies (credential creation and verification).
Functions
| Name | Description |
|---|---|
Registration.create | Creates a new WebAuthn P256 Credential, which can be stored and later used for signing. |
Registration.deserializeOptions | Deserializes credential creation options that can be passed to navigator.credentials.create(). |
Registration.deserializeResponse | Deserializes a serialized registration response. |
Registration.getOptions | Returns the creation options for a P256 WebAuthn Credential to be used with the Web Authentication API. |
Registration.serializeOptions | Serializes credential creation options into a JSON-serializable format, converting BufferSource fields to base64url strings. |
Registration.serializeResponse | Serializes a registration response into a JSON-serializable format, converting ArrayBuffer fields to base64url strings and the public key to a hex string. |
Registration.verify | Verifies a WebAuthn registration (credential creation) response. Validates the clientDataJSON, attestationObject, authenticator flags, challenge, origin, and relying party ID, then extracts the credential ID and public key. |
Errors
| Name | Description |
|---|---|
Registration.CreateFailedError | Thrown when a WebAuthn P256 credential creation fails. |
Registration.VerifyError | Thrown when WebAuthn registration verification fails. |
Types
| Name | Description |
|---|---|
Registration.Response | Response from a WebAuthn registration ceremony. |

