Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(clerk-js): Use a cookie instead of localStorage for active org #4394

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BRKalow
Copy link
Member

@BRKalow BRKalow commented Oct 23, 2024

Description

Fixes an issue where browsers with localStorage disabled would cause an error to be thrown.

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 Oct 23, 2024

🦋 Changeset detected

Latest commit: ff7a729

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

@BRKalow
Copy link
Member Author

BRKalow commented Oct 23, 2024

!snapshot

@clerk-cookie
Copy link
Collaborator

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

Package Version
@clerk/astro 1.4.1-snapshot.vff7a729
@clerk/backend 1.15.1-snapshot.vff7a729
@clerk/chrome-extension 1.3.22-snapshot.vff7a729
@clerk/clerk-js 5.29.0-snapshot.vff7a729
@clerk/elements 0.17.1-snapshot.vff7a729
@clerk/clerk-expo 2.2.28-snapshot.vff7a729
@clerk/express 1.3.3-snapshot.vff7a729
@clerk/fastify 2.0.5-snapshot.vff7a729
@clerk/localizations 3.4.0-snapshot.vff7a729
@clerk/nextjs 6.0.1-snapshot.vff7a729
@clerk/clerk-react 5.13.1-snapshot.vff7a729
@clerk/remix 4.2.41-snapshot.vff7a729
@clerk/clerk-sdk-node 5.0.54-snapshot.vff7a729
@clerk/shared 2.10.1-snapshot.vff7a729
@clerk/tanstack-start 0.4.17-snapshot.vff7a729
@clerk/testing 1.3.15-snapshot.vff7a729
@clerk/themes 2.1.39-snapshot.vff7a729
@clerk/types 4.28.0-snapshot.vff7a729

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

npm i @clerk/[email protected] --save-exact

@clerk/backend

npm i @clerk/[email protected] --save-exact

@clerk/chrome-extension

npm i @clerk/[email protected] --save-exact

@clerk/clerk-js

npm i @clerk/[email protected] --save-exact

@clerk/elements

npm i @clerk/[email protected] --save-exact

@clerk/clerk-expo

npm i @clerk/[email protected] --save-exact

@clerk/express

npm i @clerk/[email protected] --save-exact

@clerk/fastify

npm i @clerk/[email protected] --save-exact

@clerk/localizations

npm i @clerk/[email protected] --save-exact

@clerk/nextjs

npm i @clerk/[email protected] --save-exact

@clerk/clerk-react

npm i @clerk/[email protected] --save-exact

@clerk/remix

npm i @clerk/[email protected] --save-exact

@clerk/clerk-sdk-node

npm i @clerk/[email protected] --save-exact

@clerk/shared

npm i @clerk/[email protected] --save-exact

@clerk/tanstack-start

npm i @clerk/[email protected] --save-exact

@clerk/testing

npm i @clerk/[email protected] --save-exact

@clerk/themes

npm i @clerk/[email protected] --save-exact

@clerk/types

npm i @clerk/[email protected] --save-exact

@panteliselef
Copy link
Member

Our mechanism for synching state across tabs also seems to be using local storage under the hood. Do we need to take a look at that as well ?

@BRKalow
Copy link
Member Author

BRKalow commented Oct 29, 2024

@panteliselef I don't think so, the other usages seem to be correctly wrapped in a try/catch, or at least they are failing gracefully. I confirmed with the customer that this fixed the issue they were seeing with localStorage disabled.

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