fix(backend): Fix getToken() from getAuth() return value in v5 - #2539
Merged
Conversation
🦋 Changeset detectedLatest commit: 37fac81 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 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 |
dimkl
force-pushed
the
sdk-1192-get-token
branch
from
January 10, 2024 15:40
fa82747 to
e2d6e6b
Compare
dimkl
force-pushed
the
sdk-1192-get-token
branch
2 times, most recently
from
January 10, 2024 16:33
404043b to
60ba984
Compare
Contributor
Author
|
!snapshot |
24 tasks
Contributor
Author
|
!snapshot |
Collaborator
|
Hey @dimkl - 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.0.1-snapshot.v60ba984 --save-exact
npm i @clerk/chrome-extension@1.0.1-snapshot.v60ba984 --save-exact
npm i @clerk/clerk-js@5.0.1-snapshot.v60ba984 --save-exact
npm i @clerk/elements@0.0.3-snapshot.v60ba984 --save-exact
npm i @clerk/clerk-expo@1.0.1-snapshot.v60ba984 --save-exact
npm i @clerk/fastify@1.0.1-snapshot.v60ba984 --save-exact
npm i gatsby-plugin-clerk@5.0.1-snapshot.v60ba984 --save-exact
npm i @clerk/localizations@2.0.1-snapshot.v60ba984 --save-exact
npm i @clerk/nextjs@5.0.1-snapshot.v60ba984 --save-exact
npm i @clerk/clerk-react@5.0.1-snapshot.v60ba984 --save-exact
npm i @clerk/remix@4.0.1-snapshot.v60ba984 --save-exact
npm i @clerk/clerk-sdk-node@5.0.1-snapshot.v60ba984 --save-exact
npm i @clerk/shared@2.0.1-snapshot.v60ba984 --save-exact
npm i @clerk/themes@2.0.1-snapshot.v60ba984 --save-exact
npm i @clerk/types@4.0.1-snapshot.v60ba984 --save-exact |
dimkl
force-pushed
the
sdk-1192-get-token
branch
2 times, most recently
from
January 10, 2024 18:41
2f08925 to
7ffbc66
Compare
dimkl
force-pushed
the
sdk-1192-get-token
branch
from
January 11, 2024 09:35
7ffbc66 to
37fac81
Compare
SokratisVidros
approved these changes
Jan 11, 2024
Contributor
|
We will proceed with this change in V6. |
nikosdouvlis
approved these changes
Jan 11, 2024
dimkl
added this pull request to the merge queue
Jan 11, 2024
dimkl
added a commit
to clerk/clerk-docs
that referenced
this pull request
Jan 15, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Change
SessionApi.getToken()to return consistent{ data, errors }return value and fix thegetToken()from requestState to have the same return behavior as v4 (return Promise or throw error).This change fixes issues with
getToken()in@clerk/nextjs/@clerk/remix/@clerk/fastify/@clerk/sdk-node/gatsby-plugin-clerk:Example:
The change in
SessionApi.getToken()return value is a breaking change, to keep the existing behavior use the following:Checklist
npm testruns as expected.npm run buildruns as expected.Type of change
Packages affected
@clerk/backend@clerk/chrome-extension@clerk/clerk-js@clerk/clerk-expo@clerk/fastifygatsby-plugin-clerk@clerk/localizations@clerk/nextjs@clerk/clerk-react@clerk/remix@clerk/clerk-sdk-node@clerk/shared@clerk/themes@clerk/typesbuild/tooling/chore