TanStackT
TanStack2mo ago
2 replies
full-green

How to get authentication working server side with Apollo Client?

I'm trying to get authentication working with the apollo client integration. It works on the client side, and in the route file if I add the typeof window === undefined check it will pass on the client side. However, it's not getting the cookie in the header on the server side. I'm basically wondering, how do you add the headers on the server side so that the cookies would be on the link?
Screenshot_2025-12-08_at_8.55.54_PM.png
Screenshot_2025-12-08_at_8.56.08_PM.png
Screenshot_2025-12-08_at_8.56.26_PM.png
Was this page helpful?