Skip to content

Conversation

brkalow
Copy link
Member

@brkalow brkalow commented Sep 5, 2024

Description

Fixes a bug where getToken() would read stale organization data from clerk.organization. This is problematic because in the setActive() flow we call getToken() before clerk.organization is updated, and so we were reading a stale org ID when attempting to fetch a token for a new session.

For impersonation specifically, this was problematic as the impersonator's session would be in memory while setActive() was being called with the impersonated session.

Checklist

  • npm test runs as expected.
  • npm run 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:

Copy link

changeset-bot bot commented Sep 5, 2024

🦋 Changeset detected

Latest commit: c006b08

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

Copy link
Contributor

@NicolasLopes7 NicolasLopes7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@brkalow brkalow enabled auto-merge (squash) September 5, 2024 19:51
@brkalow brkalow merged commit 7934055 into main Sep 5, 2024
21 checks passed
@brkalow brkalow deleted the brk.fix/clerk-js-session-org branch September 5, 2024 19:56
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.

4 participants