fix(backend): Fix getToken() from getAuth() return value in v5 - #2535
Closed
dimkl wants to merge 1 commit into
Closed
fix(backend): Fix getToken() from getAuth() return value in v5#2535dimkl wants to merge 1 commit into
getToken() from getAuth() return value in v5#2535dimkl wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: be47fb1 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
marked this pull request as draft
January 10, 2024 10:58
Member
|
!snapshot |
Collaborator
|
Hey @nikosdouvlis - 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.v298b880 --save-exact
npm i @clerk/chrome-extension@1.0.1-snapshot.v298b880 --save-exact
npm i @clerk/clerk-js@5.0.1-snapshot.v298b880 --save-exact
npm i @clerk/elements@0.0.3-snapshot.v298b880 --save-exact
npm i @clerk/clerk-expo@1.0.1-snapshot.v298b880 --save-exact
npm i @clerk/fastify@1.0.1-snapshot.v298b880 --save-exact
npm i gatsby-plugin-clerk@5.0.1-snapshot.v298b880 --save-exact
npm i @clerk/localizations@2.0.1-snapshot.v298b880 --save-exact
npm i @clerk/nextjs@5.0.1-snapshot.v298b880 --save-exact
npm i @clerk/clerk-react@5.0.1-snapshot.v298b880 --save-exact
npm i @clerk/remix@4.0.1-snapshot.v298b880 --save-exact
npm i @clerk/clerk-sdk-node@5.0.1-snapshot.v298b880 --save-exact
npm i @clerk/shared@2.0.1-snapshot.v298b880 --save-exact
npm i @clerk/themes@2.0.1-snapshot.v298b880 --save-exact
npm i @clerk/types@4.0.1-snapshot.v298b880 --save-exact |
dimkl
force-pushed
the
fix-get-auth-get-token
branch
from
January 10, 2024 13:12
298b880 to
be47fb1
Compare
Contributor
Author
|
Closed in favor of #2539 |
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 valueand fix the
getToken()from requestState to have the same return behavior as v4(return Promise or throw error).
This change will fix issues in
@clerk/nextjs/@clerk/remixwithgetToken():Example:
Also a breaking change in the
clerkClient.sessions.getToken()was introduced as the return value was changed. 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