Skip to content

Conversation

@dios-david
Copy link
Contributor

Description

I'm using @tanstack/react-start@1.120.15 and @clerk/tanstack-react-start@0.15.8 in a project and I noticed that the Clerk response headers are not being set on the response, which is needed for some key functionalities (e.g. for the handshake).

I noticed that the getResponseClerkState() function already returns the headers, and they are added to router.update(), but this doesn't seem to work.

I applied these changes to my local project and I can confirm that I see the response headers now (x-clerk-auth-reason and x-clerk-auth-status when not logged in), but I'm not sure what is the best way to fully verify this - I added a test case to the integration tests but I don't have access to run them.

Any feedback or help would be much appreciated!

Checklist

  • pnpm test runs as expected.
  • pnpm 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 Jun 3, 2025

🦋 Changeset detected

Latest commit: f15fc4f

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-react-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

@vercel
Copy link

vercel bot commented Jun 3, 2025

@dios-david is attempting to deploy a commit to the Clerk Production Team on Vercel.

A member of the Team first needs to authorize it.

@dios-david
Copy link
Contributor Author

Hi @octoper, tagging you as I saw that you contributed the most to this package. Can you take a look at this please?

@wobsoriano wobsoriano changed the title fix(tanstack-start): Apply response headers fix(tanstack-react-start): Apply response headers Jun 4, 2025
Copy link
Member

@wobsoriano wobsoriano left a comment

Choose a reason for hiding this comment

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

Awesome catch, thank you for the PR!

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jun 4, 2025

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@6057

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@6057

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@6057

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@6057

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@6057

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@6057

@clerk/elements

npm i https://pkg.pr.new/@clerk/elements@6057

@clerk/clerk-expo

npm i https://pkg.pr.new/@clerk/clerk-expo@6057

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@6057

@clerk/express

npm i https://pkg.pr.new/@clerk/express@6057

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@6057

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@6057

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@6057

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@6057

@clerk/clerk-react

npm i https://pkg.pr.new/@clerk/clerk-react@6057

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@6057

@clerk/remix

npm i https://pkg.pr.new/@clerk/remix@6057

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@6057

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@6057

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@6057

@clerk/themes

npm i https://pkg.pr.new/@clerk/themes@6057

@clerk/types

npm i https://pkg.pr.new/@clerk/types@6057

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@6057

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@6057

commit: f15fc4f

@dios-david
Copy link
Contributor Author

@wobsoriano 🙌
can you help me resolving these integration test issues? not sure but looks like it's something permisson/certificate related

@nikosdouvlis nikosdouvlis merged commit 7d680bc into clerk:main Jun 4, 2025
11 of 30 checks passed
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.

6 participants