Class

WebauthnClient

WebauthnClient()

A class that handles WebAuthn authentication and registration.
Constructor

# new WebauthnClient()

View Source lib/client/WebauthnClient.ts, line 16

Extends

Methods

# async deleteCredential(credentialIDopt) → {Promise.<void>}

Deletes the WebAuthn credential.
Parameters:
Name Type Attributes Description
credentialID string <optional>
The credential's UUID.
See:

View Source lib/client/WebauthnClient.ts, line 313

Promise.<void>

# async listCredentials() → {Promise.<WebauthnCredentials>}

Returns a list of all WebAuthn credentials assigned to the current user.
See:

View Source lib/client/WebauthnClient.ts, line 286

Promise.<WebauthnCredentials>

# async login(userIDopt, useConditionalMediationopt) → {Promise.<void>|WebauthnFinalized}

Performs a WebAuthn authentication ceremony. When 'userID' is specified, the API provides a list of allowed credentials and the browser is able to present a list of suitable credentials to the user.
Parameters:
Name Type Attributes Description
userID string <optional>
The user's UUID.
useConditionalMediation boolean <optional>
Enables autofill assisted login.
See:

View Source lib/client/WebauthnClient.ts, line 258

Promise.<void>

# async shouldRegister(user) → {Promise.<boolean>}

Determines whether a credential registration ceremony should be performed. Returns 'true' when WebAuthn is supported and the user's credentials do not intersect with the credentials already known on the current browser/device.
Parameters:
Name Type Description
user User The user object.

View Source lib/client/WebauthnClient.ts, line 324

Promise.<boolean>

# async updateCredential(credentialIDopt, name) → {Promise.<void>}

Updates the WebAuthn credential.
Parameters:
Name Type Attributes Description
credentialID string <optional>
The credential's UUID.
name string The new credential name.
See:

View Source lib/client/WebauthnClient.ts, line 300

Promise.<void>