Skip to content

The Authentication module is a part of a client-side JavaScript SDK. It allows you to easily log in users with biometrics based on the 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:

  • Journey orchestration to support decisions and complex flows
  • Client-side WebAuthn calls, along with data processing before and after
  • Simplifies calls to Mosaic, reducing unnecessary complexity

Installation

Load the SDK:

npm install @transmitsecurity/platform-web-sdk@^2

Initialization

To initialize, use the following code:

// Import Authentication module
import { webauthn, initialize } from '@transmitsecurity/platform-web-sdk';

// Initialize SDK
// If SDK was loaded via script tag, use window.tsPlatform.initialize({ ... })
initialize({
  clientId: 'your-client-id',
  webauthn: {
    serverPath: 'https://api.transmitsecurity.io' // Required: Set serverPath based on your region or custom domain
  }
});

Customizations:

NameTypeDescription
serverPathstring(Required) The Authentication module should be configured to work with your region or custom domain by setting serverPath to:
- https://api.transmitsecurity.io (for US)
- https://api.eu.transmitsecurity.io (for EU)
- https://api.ca.transmitsecurity.io (for Canada)
- https://api.au.transmitsecurity.io (for Australia)
- https://api.sbx.transmitsecurity.io (for sandbox)
- https://<your_custom_domain> (for custom domain)
For the SDK modules to work properly together, the regions must match.
webauthnApiPaths?WebauthnApisOverride endpoints when using a proxy server in case the proxy server implements its own paths.

Next steps