Introduction

Important

The Platform SDK includes all the functionality of the WebAuthn SDK, and more. This SDK is still supported for existing integrations, but new features will only be supported by the Platform SDK.

The WebAuthn SDK is a client-side JavaScript SDK that allows you to easily login users with biometrics based on the Mosaic WebAuthn APIs. The SDK does all the heavy lifting to provide secure WebAuthn authentication while leaving you the flexibility to control the authentication logic and user experience.

Benefits

The SDK offers many advantages over the APIs, including:

  • Orchestration functionality to support decisions and complex flows
  • Client-side WebAuthn calls, along with data processing before and after
  • Stores local state, including registration status of devices, known users, etc.
  • Simplifies all calls to the Mosaic Service, reducing unnecessary complexity
  • Automatically handles tracking of cross-device flows, using simple event handlers

Installation

Add a script tag with the latest SDK to your HTML file

Copy
Copied
<script type="text/javascript"  src="https://cdn.identity.security/authentication-sdk/2.9.0/TsAuthSdk.min.js"></script>

Interfaces

Enumerations

Type Aliases

ApprovalData

Ƭ ApprovalData: Record<string, string>

Type of the data that should be provided in approval flows. Flat object that describes the data to sign for approval flows. Valid data can only include up to 10 keys, and characters that are alphanumeric, period, underscore or hyphen. It can also be passed hashed to avoid exposing potentially sensitive data in a client-side request.