Privy Integration
Privy provides embedded wallets, social login, and user management for web3 apps. You can use Privy as your auth provider for Privacy Boost, letting users log in with email, social accounts, or wallets through Privy while using Privacy Boost for private transactions.How It Works
Privy authenticates your users and issues JWTs. The SDK can attach the raw Privy token to Privacy Boost’s login flow directly, and Privacy Boost validates the token against Privy’s JWKS endpoint.Server-Side Setup
Your app must be configured with theprivy_jwt auth method. Contact the Privacy Boost team with:
- Privy App ID — Your Privy application ID (found in the Privy Dashboard)
- JWKS URL — Privy’s JWKS endpoint:
https://auth.privy.io/api/v1/apps/<YOUR_PRIVY_APP_ID>/.well-known/jwks.json
Client-Side Integration
1. Set Up Privy
Follow Privy’s React quickstart to set upPrivyProvider:
2. Configure Privacy Boost for Direct IdP Auth
Browser IdP callbacks are only supported in local key-vault mode. The default browser mode is the isolated iframe vault, which intentionally does not accept host-page token callbacks.3. Create an External Token Callback
The callback returns the raw Privy auth token. The SDK attaches it to both the/auth/login bootstrap and /auth/token exchange:
4. Authenticate with Privacy Boost
Optional: Backend Relay Instead
If you prefer to keep all auth exchanges behind your own backend, usetokenProvider instead of getExternalToken. The options are mutually exclusive.
Your backend receives the SDK’s login payload, verifies the Privy token, and forwards to Privacy Boost:
You don’t need to validate the Privy JWT yourself. Privacy Boost fetches Privy’s JWKS and verifies the token signature, audience, and expiry.
Using Privy’s Embedded Wallet
If your users use Privy’s embedded wallet (no MetaMask), you can create a wallet adapter from Privy’s wallet provider:Next Steps
Continue with setup:- Key Management — Configure key persistence for returning users
- Error Handling — Handle auth and operation errors
- Custom JWT — For Auth0, Firebase, Supabase, Clerk, or OIDC providers
- Dynamic — For Dynamic wallet connection and embedded wallets