Custom JWT Integration
If you already have an authentication system that issues JWTs (Auth0, Firebase Auth, Supabase Auth, Clerk, or a custom backend), you can use thecustom_jwt auth method to connect it to Privacy Boost. Your backend validates the user’s identity with your auth provider and forwards a JWT to Privacy Boost, which verifies it via your JWKS endpoint.
How It Works
Server-Side Setup
Your app must be configured with thecustom_jwt auth method. Contact the Privacy Boost team with:
- JWKS URL — The HTTPS endpoint serving your JSON Web Key Set (e.g.,
https://your-auth.com/.well-known/jwks.json). Privacy Boost fetches this to verify JWT signatures. - Audience (optional) — Expected
audclaim in your JWTs. If set, only tokens with a matching audience are accepted. - Issuer (optional) — Expected
issclaim in your JWTs. If set, only tokens with a matching issuer are accepted.
JWT Requirements
Your JWT must:- Be signed with RS256, RS384, RS512, ES256, ES384, or ES512
- Include a
kid(Key ID) header matching a key in your JWKS - Include a
suboruser_idclaim identifying the user - Match the configured
audandiss(if set) - Be valid (not expired)
Client-Side Integration
1. Implement a Token Provider
Your token provider routes the SDK’s login payload through your backend, which attaches the custom JWT:2. Pass the Token Provider to authenticate()
3. Implement the Backend Endpoint
Your backend endpoint receives the SDK’s login payload, attaches your JWT, and forwards to Privacy Boost:Testing
For development, you can useapp_id_only to skip the token provider entirely. Switch to custom_jwt when moving to production.
Next Steps
Continue with setup:- Key Management — Configure key persistence for returning users
- Error Handling — Handle auth and operation errors
- Privy — For Privy social login and embedded wallets
- Dynamic — For Dynamic wallet connection and embedded wallets
- API Secret — For server-to-server with client credentials