API and AuthenticationDOM Package
Setup
Install and initialize the Tiquo DOM Package
Setup
Install the DOM Package from npm:
npm install @tiquo/dom-packageGetting Your Public Key
Before using the SDK, get your public key from the Tiquo dashboard:
- Open your Tiquo dashboard
- Go to Settings > Auth DOM
- Enable the Auth DOM feature
- Copy your public key, which starts with
pk_dom_
You also need to add the domains where you plan to use the SDK to the Allowed Domains list in the same settings page. Requests from unlisted domains are rejected.
Initialize the SDK
import { TiquoAuth } from '@tiquo/dom-package';
const auth = new TiquoAuth({
publicKey: 'pk_dom_your_key_here',
});Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
publicKey | string | (required) | Your public key starting with pk_dom_ |
apiEndpoint | string | https://edge.tiquo.app | API base URL (override for development) |
debug | boolean | false | Enable debug logging to the console |
enableTabSync | boolean | true | Sync authentication state across browser tabs |
analytics | boolean | true | Enable first-party website analytics |
accessToken | string | - | Pre-set an access token for WebView integration |
refreshToken | string | - | Pre-set a refresh token for WebView integration |
const auth = new TiquoAuth({
publicKey: 'pk_dom_your_key_here',
debug: true,
enableTabSync: true,
});