Install
Quick start
API
createVerifier(options)
| Option | Type | Default | Description |
|---|---|---|---|
publishableKey | string | required | Your pk_live_ or pk_test_ key |
mode | 'online' | 'offline' | 'online' | Online checks revocation; offline is local-only |
cacheTTL | number | 300 | Seconds to cache public keys |
timeout | number | 3000 | Ms before falling back to offline |
verify(), middleware(), and warmCache().
verifier.verify(token)
TOKEN_REVOKED | TOKEN_EXPIRED | TOKEN_INVALID
verifier.middleware()
Express middleware. Attaches req.agent on success, returns 401 on failure.
verifier.warmCache(domains)
Pre-fetch and cache public keys for known issuer domains.
Offline mode
See Offline mode for details on when to use local-only validation.TypeScript
The SDK ships with full TypeScript types. No@types package needed.