Skip to content

feat(clerk-js): Send force_origin on skipCache token requests#8106

Draft
nikosdouvlis wants to merge 1 commit intomainfrom
nikos/plat-2567-force-origin-on-skipcache
Draft

feat(clerk-js): Send force_origin on skipCache token requests#8106
nikosdouvlis wants to merge 1 commit intomainfrom
nikos/plat-2567-force-origin-on-skipcache

Conversation

@nikosdouvlis
Copy link
Member

Why

When Session Minter is active, getToken({ skipCache: true }) could be routed to the edge minter instead of origin. The skipCache contract is "give me a token minted from authoritative DB data", so we need to tell the FAPI Proxy to bypass Session Minter.

What

Send force_origin=true in the query string when skipCache: true. The FAPI Proxy will use this to route directly to origin once Session Minter is enabled.

The param is currently ignored by the backend and will be wired up in PLAT-2472.

Test plan

  • Verify force_origin=true in query string when skipCache: true
  • Verify force_origin absent when skipCache: false
  • Existing skipCache flows still work

When getToken({ skipCache: true }) is called, send force_origin=true
in the query string. This tells the FAPI Proxy to route directly to
origin instead of Session Minter, preserving the skipCache contract
of always returning authoritative DB-minted tokens.
@changeset-bot
Copy link

changeset-bot bot commented Mar 18, 2026

🦋 Changeset detected

Latest commit: 1878403

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@clerk/clerk-js Patch
@clerk/chrome-extension Patch
@clerk/expo Patch

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

@vercel
Copy link

vercel bot commented Mar 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Mar 18, 2026 1:17pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants