Repository navigation
feat(backend): add Poppy browser session helpers - #10702
Draft
thiskevinwang wants to merge 1 commit into
Draft
thiskevinwang wants to merge 1 commit into
thiskevinwang wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
🦋 Changeset detectedLatest commit: 528132a The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-biometrics
@clerk/expo-google-signin
@clerk/expo-native-components
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/mosaic
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
thiskevinwang
force-pushed
the
kevin/poppy-v04-browser-session
branch
from
November 6, 2026 21:58
6e672b1 to
0b8dc07
Compare
thiskevinwang
force-pushed
the
kevin/poppy-v04-browser-session
branch
from
November 7, 2026 00:32
0b8dc07 to
ac99b0b
Compare
thiskevinwang
force-pushed
the
kevin/poppy-v04-browser-session
branch
from
November 7, 2026 01:08
ac99b0b to
12887af
Compare
thiskevinwang
force-pushed
the
kevin/poppy-v04-browser-session
branch
from
November 7, 2026 01:23
12887af to
67b7431
Compare
thiskevinwang
force-pushed
the
kevin/poppy-v04-browser-session
branch
from
November 7, 2026 05:13
67b7431 to
ebb9b68
Compare
thiskevinwang
force-pushed
the
kevin/poppy-v04-browser-session
branch
from
November 9, 2026 01:41
ebb9b68 to
d214318
Compare
thiskevinwang
force-pushed
the
kevin/poppy-v04-browser-session
branch
from
November 9, 2026 01:55
d214318 to
170e4c6
Compare
thiskevinwang
force-pushed
the
kevin/poppy-v04-browser-session
branch
from
November 9, 2026 03:20
170e4c6 to
7747bb8
Compare
thiskevinwang
force-pushed
the
kevin/poppy-v04-browser-session
branch
from
November 9, 2026 03:44
7747bb8 to
f09fa21
Compare
thiskevinwang
force-pushed
the
kevin/poppy-v04-browser-session
branch
from
November 9, 2026 05:32
f09fa21 to
443d736
Compare
thiskevinwang
force-pushed
the
kevin/poppy-v04-browser-session
branch
from
November 9, 2026 13:17
443d736 to
69e28bb
Compare
thiskevinwang
force-pushed
the
kevin/poppy-v04-browser-session
branch
from
November 9, 2026 18:50
69e28bb to
7a75150
Compare
thiskevinwang
force-pushed
the
kevin/poppy-v04-browser-session
branch
from
November 9, 2026 18:51
7a75150 to
dcb0243
Compare
thiskevinwang
force-pushed
the
kevin/poppy-v04-browser-session
branch
from
November 9, 2026 19:28
dcb0243 to
126d064
Compare
thiskevinwang
force-pushed
the
kevin/poppy-v04-browser-session
branch
from
November 9, 2026 21:06
126d064 to
0994619
Compare
thiskevinwang
force-pushed
the
kevin/poppy-v04-browser-session
branch
from
November 10, 2026 00:16
0994619 to
528132a
Compare
thiskevinwang
commented
Nov 10, 2026
| import { PoppyCallback } from '../app-router/client/PoppyCallback'; | ||
| import { decryptClerkRequestData } from './utils'; | ||
|
|
||
| export async function PoppyCallbackPage() { |
Member
Author
There was a problem hiding this comment.
Member
Author
There was a problem hiding this comment.
Update: FAPI interaction, primarily ...
signIn.create({ strategy: 'ticket', ticket })
...needs to happen client side.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implement support for Poppy v0.4 browser session endpoints. See https://personalagentprotocol.org/docs/0.4/guides#company-browsing
We'll support
#3— Signed-in browsing with the account's full accesspoppy:browser-sign-inscope allows everything the account can do.The rationale: given the browser session endpoint will resolve to a clerk user session, we don't want to conflate that end state with OAuth scopes. This decision is 100% fine by the spec 1,
The high-level flow:
stateDiagram-v2 state "1. Discovery" as Discovery state "2. OAuth" as OAuth state "3. Poppy browser Session endpoint" as BrowserJoin state "4. Clerk ticket issued" as Ticket state "5. Redeemed for Clerk session" as ClerkSession Discovery --> OAuth OAuth --> BrowserJoin BrowserJoin --> Ticket Ticket --> ClerkSessionProposed SDK usage guide — Next.js
Important
Proposed SDK usage...
1. Add the Clerk-defined
__experimental_poppyoption toproxy.ts, alongside normal route protection. Replacehttps://example.comwith the configured application origin.2. Add the Clerk-defined callback at
app/poppy/browser-session/callback/page.tsx.What is this component? ..So, the flow is
GET /{J}({J} = browser session endpoint)POST /{J}/authorize,application/jsonPOST /{J},application/x-www-form-urlencodedticketin cookies, and 303 redirect to/{J}/callbackwhich is where thePoppyCallbackPageis mounted.3. Read normal Clerk authentication in a Server Component or Route Handler.
At this point, agent auth is readable by the application. ✅
userIdidentifies the Clerk account.agentis present only for an authenticated, agent-attributed Clerk Session. Only present when actually sign-in.agent.__experimental_poppyClientId~ The agents CIMD urlagent.__experimental_poppyUserId~ The agent's pseudonymous user id (not a clerk user id)agent.__experimental_poppySessionId~ The agent's poppy session idChecklist
Type of change
Footnotes
Personal agents work faster and more reliably through a company agent or APIs than through a website, so start there for the tasks users ask for most. Then choose how much of your website personal agents can use, from least to most ↩