- User keys are time-bound, meaning they can only sign requests for a limited window before they expire, and a new user key must be requested.
- When returning a user’s key, Privy encrypts the key under a public-private keypair that your app generates. This ensures that only your server can decrypt the user’s key.
1
Configure authentication settings
In the Privy Dashboard, configure your authentication settings from your authentication provider. In particular, register the JWKS.json endpoint that will be used to verify your user’s access token.
2
Generate a keypair to encrypt user keys
Generate a public-private keypair (ECH P-256) that will be used to encrypt the user key. Make sure to save both the public and private keys.
3
Request a user key from the Privy API
Make a request to the Privy API with the user’s access token and the public key you generated. Privy will return a user key for the user, encrypted under the public key you provided, which you can decrypt with the corresponding private key.

