Skip to content

fix(tanstack-start): Fix bug for getAuth - #4019

Merged
octoper merged 1 commit into
mainfrom
vaggelis/eco-169-requests-gets-locked-when-using-getauth-multiple-times
Aug 27, 2024
Merged

fix(tanstack-start): Fix bug for getAuth#4019
octoper merged 1 commit into
mainfrom
vaggelis/eco-169-requests-gets-locked-when-using-getauth-multiple-times

Conversation

@octoper

@octoper octoper commented Aug 26, 2024

Copy link
Copy Markdown
Contributor

Description

This PR fixes a bug occurred when using getAuth in multiple server functions

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

changeset-bot Bot commented Aug 26, 2024

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 41d1e88

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

This PR includes changesets to release 1 package
Name Type
@clerk/tanstack-start 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

@octoper octoper self-assigned this Aug 26, 2024
@octoper

octoper commented Aug 26, 2024

Copy link
Copy Markdown
Contributor Author

!snapshot

@clerk-cookie

Copy link
Copy Markdown
Collaborator

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

Package Version
@clerk/astro 1.2.1-snapshot.vf6cf34f
@clerk/backend 1.8.1-snapshot.vf6cf34f
@clerk/chrome-extension 1.2.4-snapshot.vf6cf34f
@clerk/clerk-js 5.16.0-snapshot.vf6cf34f
@clerk/elements 0.14.1-snapshot.vf6cf34f
@clerk/clerk-expo 2.2.2-snapshot.vf6cf34f
@clerk/express 0.0.31-snapshot.vf6cf34f
@clerk/fastify 1.0.33-snapshot.vf6cf34f
@clerk/localizations 2.6.2-snapshot.vf6cf34f
@clerk/nextjs 5.3.4-snapshot.vf6cf34f
@clerk/clerk-react 5.4.3-snapshot.vf6cf34f
@clerk/remix 4.2.17-snapshot.vf6cf34f
@clerk/clerk-sdk-node 5.0.30-snapshot.vf6cf34f
@clerk/shared 2.5.3-snapshot.vf6cf34f
@clerk/tanstack-start 0.3.0-snapshot.vf6cf34f
@clerk/testing 1.2.13-snapshot.vf6cf34f
@clerk/themes 2.1.22-snapshot.vf6cf34f
@clerk/types 4.15.0-snapshot.vf6cf34f

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

npm i @clerk/astro@1.2.1-snapshot.vf6cf34f --save-exact

@clerk/backend

npm i @clerk/backend@1.8.1-snapshot.vf6cf34f --save-exact

@clerk/chrome-extension

npm i @clerk/chrome-extension@1.2.4-snapshot.vf6cf34f --save-exact

@clerk/clerk-js

npm i @clerk/clerk-js@5.16.0-snapshot.vf6cf34f --save-exact

@clerk/elements

npm i @clerk/elements@0.14.1-snapshot.vf6cf34f --save-exact

@clerk/clerk-expo

npm i @clerk/clerk-expo@2.2.2-snapshot.vf6cf34f --save-exact

@clerk/express

npm i @clerk/express@0.0.31-snapshot.vf6cf34f --save-exact

@clerk/fastify

npm i @clerk/fastify@1.0.33-snapshot.vf6cf34f --save-exact

@clerk/localizations

npm i @clerk/localizations@2.6.2-snapshot.vf6cf34f --save-exact

@clerk/nextjs

npm i @clerk/nextjs@5.3.4-snapshot.vf6cf34f --save-exact

@clerk/clerk-react

npm i @clerk/clerk-react@5.4.3-snapshot.vf6cf34f --save-exact

@clerk/remix

npm i @clerk/remix@4.2.17-snapshot.vf6cf34f --save-exact

@clerk/clerk-sdk-node

npm i @clerk/clerk-sdk-node@5.0.30-snapshot.vf6cf34f --save-exact

@clerk/shared

npm i @clerk/shared@2.5.3-snapshot.vf6cf34f --save-exact

@clerk/tanstack-start

npm i @clerk/tanstack-start@0.3.0-snapshot.vf6cf34f --save-exact

@clerk/testing

npm i @clerk/testing@1.2.13-snapshot.vf6cf34f --save-exact

@clerk/themes

npm i @clerk/themes@2.1.22-snapshot.vf6cf34f --save-exact

@clerk/types

npm i @clerk/types@4.15.0-snapshot.vf6cf34f --save-exact

* https://github.com/whatwg/fetch/pull/1457
* @internal
*/
export const patchRequest = (request: Request) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@octoper Would it make sense or is it possible to have this be part of createClerkRequest ?

I remember having to do something similar for remix.

@octoper octoper Aug 27, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah need we need to revise it in the @clerk/backend how we handle request, I will add ticket so we can have a better look at it

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Curious if adding this to createClerkRequest would break other SDKs like Next

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I was not sure about it, I created a ticket so we can have a better look at it and have one solution for everything

@octoper
octoper force-pushed the vaggelis/eco-169-requests-gets-locked-when-using-getauth-multiple-times branch 2 times, most recently from 293a7aa to d5b762c Compare August 27, 2024 11:04
@octoper
octoper force-pushed the vaggelis/eco-169-requests-gets-locked-when-using-getauth-multiple-times branch from d5b762c to 41d1e88 Compare August 27, 2024 15:07
@octoper
octoper requested a review from panteliselef August 27, 2024 15:07
@octoper
octoper marked this pull request as ready for review August 27, 2024 15:08

@wobsoriano wobsoriano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks clean 🚀

@octoper
octoper merged commit 6428493 into main Aug 27, 2024
@octoper
octoper deleted the vaggelis/eco-169-requests-gets-locked-when-using-getauth-multiple-times branch August 27, 2024 15:56
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