The Auth0 SDKs verify these for you. To learn more, read Add Personal Agent Protocol to Your API and Add Personal Agent Protocol to Your Web App.
The Poppy-Session header
The agent signs a new Poppy-Session JWT for every request to your API. Each JWT is signed with a short-lived delegation key. To show that the agent authorized this key, the JWT’s poppy_dlg header carries a delegation: a statement, signed with one of the agent’s long-term keys, that vouches for the delegated key. The agent publishes its long-term keys at the jwks_uri in its metadata document.
The following example shows the JWT payload:
On its own, the header grants only anonymous, signed-out access. To act on the user’s account, the request also needs a valid access token. Treat the header as a credential and don’t log it.
The agent’s access token
After Direct Sign-In, the agent receives an access token for your API. The examples on this page show an agent application linked to an agent, with agent subject claims enabled, which is what the Auth0 CLI sets up. The user is the subject and the agent is the actor. The following example uses the RFC 9068 token profile:client_id is the agent’s CIMD URL. With the Auth0 token profile, it’s in azp instead. act.client_id is the Auth0 client ID of the agent’s application.
The agent sends it with the Poppy-Session header. If the token is DPoP-bound, the request also carries a DPoP proof. To learn more, read Demonstrating Proof-of-Possession.
Web app tokens after a browser join
At the end of a browser join, your web application runs a normal login and receives an ID token and access token. For guest and signed-in joins, the ID and access tokens carry anact claim that names the agent and its Session. The poppy_* values come from the agent, not from Auth0:
If the agent’s application isn’t linked to an agent,
act.sub is the agent’s CIMD URL, and act has no sub_profile, client_id, or iss. Link your agents to get the full actor information. The Auth0 CLI links the agents it registers.Signed-in join
The subject is the user. The ID token is a regular Auth0 ID token for the user, with the user’s profile claims, that also includes theact claim:
poppy:browser-sign-in:
Signed-out join (guest)
The subject is an anonymous user ID that stays the same for the same agent, Poppy User ID, and Poppy Agent ID, so a returning guest gets the same subject across Sessions. There’s no associated user record.sub_profile contains urn:auth0:anonymous_user, and act names the agent as in a signed-in join.
The following example shows a guest ID token:
sub, sub_profile, and act. It’s issued for your API only if your API grants scopes to anonymous users through a client grant for the web application. Otherwise, the web application receives only an opaque access token for the /userinfo endpoint, if it’s configured to allow OIDC. To learn more, read Set Up Manually. Auth0 never issues a refresh token after a join.
Lifetime
The Auth0 session and the tokens a join creates last at most 2 hours. Limit your web application’s session to the same length, or shorter if your tenant settings end sessions sooner.Tell who is acting
Correlate activity with Sessions
Each Session has an ID that appears in requests to both your API and your web application. Use it to correlate activity that belongs to the same task:- Across sign-in: The Session ID stays the same when a guest signs in, so a cart filled as a guest is still there at checkout.
- Across surfaces: The same Session can reach your API and your website, so you can follow one task across surfaces.
The values are the same across fields; for example,
sid in the Poppy-Session header equals act.poppy_sid in both tokens, and sub equals act.poppy_user_id. As a result, the same key finds the same Session state at your API and your website, where together, they identify one Session. The protocol requires agents to choose Session IDs at random, so they can’t be guessed. Auth0 copies the IDs into tokens from the Poppy-Session header it verifies at the browser join.
The
poppy_user_id and sub of the Poppy-Session header are pseudonymous IDs chosen by the agent. Never use them as an account identifier. The account is the sub of a verified access token.