Repository navigation
docs(poppy): key a Poppy Session by its Session ID and User ID - #2959
Conversation
Change the guide's cart key from act.sub + poppy_sid + poppy_user_id to poppy_sid + poppy_user_id, the key auth0-api-js and auth0-server-js use. act.sub and poppy_agent_id are data about the Session, not part of the key, since act.sub is the Auth0 agent's ID for a linked agent. Co-Authored-By: Claude <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## beta #2959 +/- ##
=======================================
Coverage 90.83% 90.83%
=======================================
Files 84 84
Lines 6468 6468
Branches 2321 2321
=======================================
Hits 5875 5875
Misses 528 528
Partials 65 65 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The guide isn't on main yet, so the README link 404s. Co-Authored-By: Claude <noreply@anthropic.com>
- Prefix the agent key with agent:, so an agent that sends auth0 and abc123 can't get the key of the customer auth0|abc123 - Say the key stays the same only when both poppy_sid and poppy_user_id are the same in the two joins - Say the SDK can't check that a Session ID is random, and that the key is a name for the Session, not a secret or proof of the agent - Link the guide from the README with a relative path Co-Authored-By: Claude <noreply@anthropic.com>
|
Two more places still use the old rule, but they are not in this diff. Please update them in this PR too, else the guide and the code will disagree.
|
- The poppy_sid JSDoc says to key a cart by it together with poppy_user_id, never alone - The example keys its cart map by agent:<poppy_sid>|<poppy_user_id>, as the guide does, and shows those two on the cart page - The example README says the same Co-Authored-By: Claude <noreply@anthropic.com>
📋 Changes
Docs only. The Poppy guide now keys a Poppy Session by
act.poppy_sid+act.poppy_user_id, which is what@auth0/auth0-api-jsand@auth0/auth0-server-jsnow use.`agent:${poppy.act.poppy_sid}|${poppy.act.poppy_user_id}`, withoutact.sub. Theagent:prefix keeps it apart from a customer'ssub, since the agent chooses both values.poppy_sidandpoppy_user_idas the guest's, whether the agent is linked to an Auth0 agent or not.act.subandact.poppy_agent_idare data about the Session, not part of the key. For a linked agent,act.subis the Auth0 agent's ID, not its URL.act.subfor that.Also fixes the README's link to the Poppy guide: it pointed at
main, where the guide doesn't exist yet. It is now a relative link (./guides/poppy.md), so it follows whichever branch the README is read on.The SDK itself builds no key, so no code changes.
📎 References
🎯 Testing
N/A, docs only.
🤖 Generated with Claude Code