fix(clerk-js): Ensure setActive does not emit token before onBeforeSetActive#5986
fix(clerk-js): Ensure setActive does not emit token before onBeforeSetActive#5986
Conversation
🦋 Changeset detectedLatest commit: 8f3db30 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@clerk/agent-toolkit
@clerk/astro
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/backend
@clerk/elements
@clerk/clerk-expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/clerk-react
@clerk/react-router
@clerk/remix
@clerk/tanstack-react-start
@clerk/testing
@clerk/shared
@clerk/themes
@clerk/types
@clerk/upgrade
@clerk/vue
commit: |
|
!snapshot |
|
Hey @brkalow - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/agent-toolkit@0.0.38-snapshot.v20250522182206 --save-exact
npm i @clerk/astro@2.8.0-snapshot.v20250522182206 --save-exact
npm i @clerk/backend@1.33.0-snapshot.v20250522182206 --save-exact
npm i @clerk/chrome-extension@2.4.8-snapshot.v20250522182206 --save-exact
npm i @clerk/clerk-js@5.67.3-snapshot.v20250522182206 --save-exact
npm i @clerk/elements@0.23.29-snapshot.v20250522182206 --save-exact
npm i @clerk/clerk-expo@2.11.8-snapshot.v20250522182206 --save-exact
npm i @clerk/expo-passkeys@0.3.6-snapshot.v20250522182206 --save-exact
npm i @clerk/express@1.5.0-snapshot.v20250522182206 --save-exact
npm i @clerk/fastify@2.2.21-snapshot.v20250522182206 --save-exact
npm i @clerk/nextjs@6.20.0-snapshot.v20250522182206 --save-exact
npm i @clerk/nuxt@1.6.7-snapshot.v20250522182206 --save-exact
npm i @clerk/clerk-react@5.31.6-snapshot.v20250522182206 --save-exact
npm i @clerk/react-router@1.4.6-snapshot.v20250522182206 --save-exact
npm i @clerk/remix@4.7.6-snapshot.v20250522182206 --save-exact
npm i @clerk/shared@3.9.3-snapshot.v20250522182206 --save-exact
npm i @clerk/tanstack-react-start@0.15.6-snapshot.v20250522182206 --save-exact
npm i @clerk/testing@1.7.3-snapshot.v20250522182206 --save-exact
npm i @clerk/vue@1.8.4-snapshot.v20250522182206 --save-exact |
Description
Currently, we are updating the session token with the new session's token during a session switch, causing the invalidate cache call in
onBeforeSetActive()to use the new token. Conceptually, this is wrong. We expect this call to be made with the current (previous) session's token before the new session is actually switched to.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change