Skip to content

Conversation

@brkalow
Copy link
Member

@brkalow brkalow commented May 23, 2025

Description

Updates our session cookie setting logic to only set the session cookie if the current Clerk instance's session and org ID match the latest known active IDs. This fixes an edge case where two tabs with multiple sessions might both try to set the session cookie.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@changeset-bot
Copy link

changeset-bot bot commented May 23, 2025

🦋 Changeset detected

Latest commit: 4e38ffb

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/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 May 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2025 0:20am

@brkalow brkalow changed the base branch from main to brk.fix/set-active-emit-previous-token May 23, 2025 02:51
@brkalow
Copy link
Member Author

brkalow commented May 23, 2025

!snapshot

@pkg-pr-new
Copy link

pkg-pr-new bot commented May 23, 2025

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@5989

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@5989

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@5989

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@5989

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@5989

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@5989

@clerk/elements

npm i https://pkg.pr.new/@clerk/elements@5989

@clerk/clerk-expo

npm i https://pkg.pr.new/@clerk/clerk-expo@5989

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@5989

@clerk/express

npm i https://pkg.pr.new/@clerk/express@5989

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@5989

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@5989

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@5989

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@5989

@clerk/clerk-react

npm i https://pkg.pr.new/@clerk/clerk-react@5989

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@5989

@clerk/remix

npm i https://pkg.pr.new/@clerk/remix@5989

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@5989

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@5989

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@5989

@clerk/themes

npm i https://pkg.pr.new/@clerk/themes@5989

@clerk/types

npm i https://pkg.pr.new/@clerk/types@5989

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@5989

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@5989

commit: cdd5464

@clerk-cookie
Copy link
Collaborator

Hey @brkalow - the snapshot version command generated the following package versions:

Package Version
@clerk/agent-toolkit 0.0.38-snapshot.v20250523025219
@clerk/astro 2.8.0-snapshot.v20250523025219
@clerk/backend 1.33.0-snapshot.v20250523025219
@clerk/chrome-extension 2.4.8-snapshot.v20250523025219
@clerk/clerk-js 5.67.3-snapshot.v20250523025219
@clerk/elements 0.23.29-snapshot.v20250523025219
@clerk/clerk-expo 2.11.8-snapshot.v20250523025219
@clerk/expo-passkeys 0.3.6-snapshot.v20250523025219
@clerk/express 1.5.0-snapshot.v20250523025219
@clerk/fastify 2.2.21-snapshot.v20250523025219
@clerk/nextjs 6.20.0-snapshot.v20250523025219
@clerk/nuxt 1.6.7-snapshot.v20250523025219
@clerk/clerk-react 5.31.6-snapshot.v20250523025219
@clerk/react-router 1.4.6-snapshot.v20250523025219
@clerk/remix 4.7.6-snapshot.v20250523025219
@clerk/shared 3.9.3-snapshot.v20250523025219
@clerk/tanstack-react-start 0.15.6-snapshot.v20250523025219
@clerk/testing 1.7.3-snapshot.v20250523025219
@clerk/vue 1.8.4-snapshot.v20250523025219

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/agent-toolkit

npm i @clerk/agent-toolkit@0.0.38-snapshot.v20250523025219 --save-exact

@clerk/astro

npm i @clerk/astro@2.8.0-snapshot.v20250523025219 --save-exact

@clerk/backend

npm i @clerk/backend@1.33.0-snapshot.v20250523025219 --save-exact

@clerk/chrome-extension

npm i @clerk/chrome-extension@2.4.8-snapshot.v20250523025219 --save-exact

@clerk/clerk-js

npm i @clerk/clerk-js@5.67.3-snapshot.v20250523025219 --save-exact

@clerk/elements

npm i @clerk/elements@0.23.29-snapshot.v20250523025219 --save-exact

@clerk/clerk-expo

npm i @clerk/clerk-expo@2.11.8-snapshot.v20250523025219 --save-exact

@clerk/expo-passkeys

npm i @clerk/expo-passkeys@0.3.6-snapshot.v20250523025219 --save-exact

@clerk/express

npm i @clerk/express@1.5.0-snapshot.v20250523025219 --save-exact

@clerk/fastify

npm i @clerk/fastify@2.2.21-snapshot.v20250523025219 --save-exact

@clerk/nextjs

npm i @clerk/nextjs@6.20.0-snapshot.v20250523025219 --save-exact

@clerk/nuxt

npm i @clerk/nuxt@1.6.7-snapshot.v20250523025219 --save-exact

@clerk/clerk-react

npm i @clerk/clerk-react@5.31.6-snapshot.v20250523025219 --save-exact

@clerk/react-router

npm i @clerk/react-router@1.4.6-snapshot.v20250523025219 --save-exact

@clerk/remix

npm i @clerk/remix@4.7.6-snapshot.v20250523025219 --save-exact

@clerk/shared

npm i @clerk/shared@3.9.3-snapshot.v20250523025219 --save-exact

@clerk/tanstack-react-start

npm i @clerk/tanstack-react-start@0.15.6-snapshot.v20250523025219 --save-exact

@clerk/testing

npm i @clerk/testing@1.7.3-snapshot.v20250523025219 --save-exact

@clerk/vue

npm i @clerk/vue@1.8.4-snapshot.v20250523025219 --save-exact

Base automatically changed from brk.fix/set-active-emit-previous-token to main May 28, 2025 12:12
@brkalow brkalow merged commit 694ff23 into main May 28, 2025
36 checks passed
@brkalow brkalow deleted the brk.fix/session-token-active-session branch May 28, 2025 14:03
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.

5 participants