Skip to content

Deprecate clerk set session#1800

Merged
dimkl merged 1 commit intomainfrom
deprecate-clerk-set-session
Sep 29, 2023
Merged

Deprecate clerk set session#1800
dimkl merged 1 commit intomainfrom
deprecate-clerk-set-session

Conversation

@dimkl
Copy link
Copy Markdown
Contributor

@dimkl dimkl commented Sep 29, 2023

Description

Since we are deprecation the setSession hook from @clerk/clerk-react and there is a @experimental directive on Clerk.setActive which indicates that it's gonna replace the Clerk.setSession, I deprecated the Clerk.setSession.

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:

Packages affected

  • @clerk/clerk-js
  • @clerk/clerk-react
  • @clerk/nextjs
  • @clerk/remix
  • @clerk/types
  • @clerk/themes
  • @clerk/localizations
  • @clerk/clerk-expo
  • @clerk/backend
  • @clerk/clerk-sdk-node
  • @clerk/shared
  • @clerk/fastify
  • @clerk/chrome-extension
  • gatsby-plugin-clerk
  • build/tooling/chore

@dimkl dimkl requested a review from a team as a code owner September 29, 2023 12:42
@dimkl dimkl self-assigned this Sep 29, 2023
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Sep 29, 2023

🦋 Changeset detected

Latest commit: 9e97285

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

@dimkl dimkl force-pushed the deprecate-clerk-set-session branch from 3ddec71 to f4ce813 Compare September 29, 2023 12:43
Copy link
Copy Markdown
Contributor

@panteliselef panteliselef left a comment

Choose a reason for hiding this comment

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

😎

@dimkl dimkl force-pushed the deprecate-clerk-set-session branch from f4ce813 to dae00d5 Compare September 29, 2023 14:34
@dimkl dimkl enabled auto-merge September 29, 2023 14:34
@dimkl dimkl force-pushed the deprecate-clerk-set-session branch from dae00d5 to 9e97285 Compare September 29, 2023 14:39
@dimkl dimkl added this pull request to the merge queue Sep 29, 2023
Merged via the queue into main with commit d1ad5ac Sep 29, 2023
@dimkl dimkl deleted the deprecate-clerk-set-session branch September 29, 2023 14:55
@clerk-cookie clerk-cookie mentioned this pull request Sep 29, 2023
@sytpb
Copy link
Copy Markdown

sytpb commented Nov 23, 2023

https://clerk.com/docs/custom-flows/embedded-magic-links , setSession in this document should be deprecated , how to use setActive to accept magic links?

dimkl added a commit to clerk/clerk-docs that referenced this pull request Nov 23, 2023
@dimkl
Copy link
Copy Markdown
Contributor Author

dimkl commented Nov 23, 2023

@sytpb thank you for your feedback. We will update the docs soon. Until then:

const { setActive } = useSignIn();

setActive({
  session: 'sessionOrSessionId',
  beforeEmit: () => optionalNavigationOrCallbackFn()
});

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