Methods
# static getInstance() → {WebauthnManager}
Gets the singleton instance of WebauthnManager.
Creates a new instance if one doesn't exist, otherwise returns the existing one.
The singleton instance
# async createWebauthnCredential(options) → {Promise.<PublicKeyCredentialWithAttestationJSON>}
Creates a new WebAuthn credential using the provided options.
Aborts any previous request before starting a new one.
Parameters:
Name | Type | Description |
---|---|---|
options |
CredentialCreationOptionsJSON
|
The options for credential creation |
If the WebAuthn request fails (e.g., aborted, not allowed)
DOMException
A promise resolving to the created credential
Promise.<PublicKeyCredentialWithAttestationJSON>
# async getConditionalWebauthnCredential(publicKey) → {Promise.<PublicKeyCredentialWithAssertionJSON>}
Retrieves a WebAuthn credential with conditional UI mediation.
Aborts any previous request before starting a new one.
Parameters:
Name | Type | Description |
---|---|---|
publicKey |
CredentialRequestOptionsJSON
|
The public key options for conditional retrieval |
If the WebAuthn request fails (e.g., aborted, not allowed)
DOMException
A promise resolving to the retrieved credential
Promise.<PublicKeyCredentialWithAssertionJSON>
# async getWebauthnCredential(options) → {Promise.<PublicKeyCredentialWithAssertionJSON>}
Retrieves a WebAuthn credential using the provided options.
Aborts any previous request before starting a new one.
Parameters:
Name | Type | Description |
---|---|---|
options |
CredentialRequestOptionsJSON
|
The options for credential retrieval |
If the WebAuthn request fails (e.g., aborted, not allowed)
DOMException
A promise resolving to the retrieved credential
Promise.<PublicKeyCredentialWithAssertionJSON>