Skip to content

Conversation

@panteliselef
Copy link
Member

@panteliselef panteliselef commented Aug 13, 2024

Description

Persisting the client after sign out allows for matching a user's device with a client. This can potentially unlock many features that can build on top of this new assumption.

Since this is a very core mechanism, we would like to test it out in the wild first and then roll it out for everyone. In order to opt-in and start persisting the client after sign-out simply pass { persistClient: true } to the new experimental property of ClerkOptions

In React

<ClerkProvider  experimental={{ persistClient: true }} />

In Vanilla JS

await clerk.load({ experimental: { persistClient: true } })

SDKI-627

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:

@changeset-bot
Copy link

changeset-bot bot commented Aug 13, 2024

🦋 Changeset detected

Latest commit: d3c2f87

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 18 packages
Name Type
@clerk/types Minor
@clerk/clerk-js Minor
@clerk/astro Patch
@clerk/backend Patch
@clerk/elements Patch
@clerk/clerk-expo Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/localizations Patch
@clerk/nextjs Patch
@clerk/clerk-react Patch
@clerk/remix Patch
@clerk/clerk-sdk-node Patch
@clerk/shared Patch
@clerk/tanstack-start Patch
@clerk/testing Patch
@clerk/themes Patch
@clerk/chrome-extension 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

@panteliselef
Copy link
Member Author

!snapshot

@clerk-cookie
Copy link
Collaborator

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

Package Version
@clerk/astro 1.0.13-snapshot.v6f239bb
@clerk/chrome-extension 1.2.2-snapshot.v6f239bb
@clerk/clerk-js 5.15.0-snapshot.v6f239bb
@clerk/clerk-expo 2.1.2-snapshot.v6f239bb

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

npm i @clerk/astro@1.0.13-snapshot.v6f239bb --save-exact

@clerk/chrome-extension

npm i @clerk/chrome-extension@1.2.2-snapshot.v6f239bb --save-exact

@clerk/clerk-js

npm i @clerk/clerk-js@5.15.0-snapshot.v6f239bb --save-exact

@clerk/clerk-expo

npm i @clerk/clerk-expo@2.1.2-snapshot.v6f239bb --save-exact

@panteliselef panteliselef force-pushed the elef/stop-destroying-the-client branch from 6f239bb to 3c1fab8 Compare August 29, 2024 10:52
@panteliselef panteliselef removed the request for review from dimkl August 29, 2024 10:52
@panteliselef panteliselef marked this pull request as ready for review September 2, 2024 11:52
Co-authored-by: Lennart <lekoarts@gmail.com>
@panteliselef
Copy link
Member Author

!snapshot

});
});

testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes_persist_client] })(
Copy link
Member

Choose a reason for hiding this comment

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

nice tests 👏

@panteliselef panteliselef enabled auto-merge (squash) September 3, 2024 14:36
@panteliselef panteliselef merged commit e95c281 into main Sep 3, 2024
@panteliselef panteliselef deleted the elef/stop-destroying-the-client branch September 3, 2024 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants