fix(clerk-js): Remove session cookie when signing out and onBeforeSetActive - #3371
Conversation
🦋 Changeset detectedLatest commit: c469a32 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 |
|
!snapshot |
|
Hey @octoper - 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/chrome-extension@1.0.9-snapshot.v40b4e54 --save-exact
npm i @clerk/clerk-js@5.2.5-snapshot.v40b4e54 --save-exact
npm i @clerk/clerk-expo@1.1.1-snapshot.v40b4e54 --save-exact
npm i gatsby-plugin-clerk@5.0.0-beta.45 --save-exact
npm i @clerk/localizations@2.4.0-snapshot.v40b4e54 --save-exact |
|
!snapshot |
|
Hey @octoper - 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/chrome-extension@1.0.9-snapshot.v3595faf --save-exact
npm i @clerk/clerk-js@5.2.5-snapshot.v3595faf --save-exact
npm i @clerk/clerk-expo@1.1.1-snapshot.v3595faf --save-exact
npm i gatsby-plugin-clerk@5.0.0-beta.45 --save-exact
npm i @clerk/localizations@2.4.0-snapshot.v3595faf --save-exact |
|
!snapshot |
|
Hey @octoper - 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/chrome-extension@1.0.9-snapshot.vb1a12ac --save-exact
npm i @clerk/clerk-js@5.2.5-snapshot.vb1a12ac --save-exact
npm i @clerk/clerk-expo@1.1.1-snapshot.vb1a12ac --save-exact
npm i gatsby-plugin-clerk@5.0.0-beta.45 --save-exact
npm i @clerk/localizations@2.4.0-snapshot.vb1a12ac --save-exact
npm i @clerk/nextjs@5.0.9-snapshot.vb1a12ac --save-exact |
|
!snapshot |
|
Hey @octoper - 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/chrome-extension@1.0.9-snapshot.v5ac0a48 --save-exact
npm i @clerk/clerk-js@5.2.5-snapshot.v5ac0a48 --save-exact
npm i @clerk/clerk-expo@1.1.1-snapshot.v5ac0a48 --save-exact
npm i gatsby-plugin-clerk@5.0.0-beta.45 --save-exact
npm i @clerk/localizations@2.4.0-snapshot.v5ac0a48 --save-exact
npm i @clerk/nextjs@5.0.9-snapshot.v5ac0a48 --save-exact |
5ac0a48 to
3019c67
Compare
|
!snapshot |
|
Hey @octoper - 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/backend@1.1.5-snapshot.v58e76d6 --save-exact
npm i @clerk/chrome-extension@1.0.10-snapshot.v58e76d6 --save-exact
npm i @clerk/clerk-js@5.3.1-snapshot.v58e76d6 --save-exact
npm i @clerk/elements@0.4.2-snapshot.v58e76d6 --save-exact
npm i @clerk/clerk-expo@1.1.2-snapshot.v58e76d6 --save-exact
npm i @clerk/express@0.0.8-snapshot.v58e76d6 --save-exact
npm i @clerk/fastify@1.0.7-snapshot.v58e76d6 --save-exact
npm i gatsby-plugin-clerk@5.0.0-beta.45 --save-exact
npm i @clerk/nextjs@5.0.10-snapshot.v58e76d6 --save-exact
npm i @clerk/clerk-react@5.0.6-snapshot.v58e76d6 --save-exact
npm i @clerk/remix@4.0.8-snapshot.v58e76d6 --save-exact
npm i @clerk/clerk-sdk-node@5.0.7-snapshot.v58e76d6 --save-exact
npm i @clerk/shared@2.1.1-snapshot.v58e76d6 --save-exact
npm i @clerk/testing@1.0.5-snapshot.v58e76d6 --save-exact |
5ac9520 to
cf12ff3
Compare
|
!snapshot |
|
Hey @octoper - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i gatsby-plugin-clerk@5.0.0-beta.45 --save-exact
npm i @clerk/nextjs@5.0.11-snapshot.vcf12ff3 --save-exact |
onBeforeSetActive
There was a problem hiding this comment.
Nice one @octoper 👏🏻
I will test a little bit more, add a few unit tests and I'll merge right after
b4beda6 to
c469a32
Compare
Description
Problem:
Right now when signing out on Next.js with app router, there is a chance that you will get an error as we are clearing the app router cache before removing the session cookie.
Solution:
The solution is to move the removal of the session cookie before clearing the app router cache.
Checklist
npm testruns as expected.npm run buildruns as expected.Type of change