Skip to content
Back

SSR Auth with Tanstack Start requires hard refresh

  • 0
  • Auth
  • Web
  • Cloud
Oli
15 Feb, 2026, 11:37

I followed the Next.js guide for SSR Auth on https://appwrite.io/docs/tutorials/nextjs-ssr-auth/step-1

I tried to replicate it for Tanstack Start.

However, once setting the session, e.g. through the oauth callback, the getLoggedInUser returns null A harde browser refresh is necessary in order to work. I do not understand why this is happening or what I am doing wrong.

Here is the code: https://gist.github.com/Olgoetz/a685d61c130e87b8817cb780e46888a3

TypeScript
TL;DR
SSR Auth with Tanstack Start requires a hard refresh even after setting the session; GetLoggedInUser returns 'null' without it. Check the code here: https://gist.github.com/Olgoetz/a685d61c130e87b8817cb780e46888a3 Solution: The issue may be related to how the session is being handled. You may need to tweak your authentication logic to ensure a seamless transition.
Oli
15 Feb, 2026, 11:38

SSR Auth with Tanstack Start requires hard refresh

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more