What Aiveth binds
- Bound: tokens for a person, from the
authorization_code,refresh_tokenand device code grants. - Where a bound token works:
/oauth/userinfo. - A public app’s refresh tokens: bound to the same key. Every refresh needs a proof from that key.
- Not bound: machine tokens and AI agent tokens. They are JWTs read by your own servers.
DPoP-Nonce).
Turn on DPoP
Your app gets a bound token whenever it sends a DPoP proof with its token request, with no setting needed. To refuse token requests that don’t send one:1
Open the app
In the console, open Apps and select the app.
2
Require DPoP
Under Require DPoP, select Turn on. Do this once your app always sends a proof.
invalid_dpop_proof.
At the token endpoint
Add aDPoP header to the token request. It is a JWT that your app signs with its private key:
- Header:
typisdpop+jwt,algisES256orRS256, andjwkis your public key. - Claims:
htmisPOST,htuis the token endpoint’s address (https://accounts.aiveth.com/oauth/token),iatis now, andjtiis a unique value.
token_type is DPoP instead of Bearer:
At userinfo
Send a bound token with theDPoP scheme and a new proof for this request:
ath is the base64url-encoded SHA-256 hash of the access token.
A bound token sent as Bearer is refused, and so is an unbound token sent as DPoP. A refused request gets 401 with a WWW-Authenticate header that names DPoP and the algorithms ES256 RS256.
Proof rules
Aiveth refuses a proof when:typ,algorjwkis wrong or missing,htmis not the request’s method, orhtuis not the request’s address (query and fragment are ignored),iatis more than 5 minutes away from now,jtiis missing or longer than 256 characters, or the samejtiwas already used with that key,athdoesn’t match the token (at userinfo),- the request has more than one
DPoPheader.
400 with "error": "invalid_dpop_proof" and an error_description that says why.
Refresh tokens
A refresh token that was bound must come with a proof from the same key. A proof from a different key is refused withinvalid_dpop_proof, before the refresh token is swapped.
Browser apps
Aiveth’s CORS rules allow theDPoP header on the token, userinfo and revoke endpoints, so a single-page app can use DPoP. Keep the private key non-extractable, for example with the Web Crypto API.