-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Description
Which project does this relate to?
Router
Describe the bug
useAppSession always return null session in node-server production build
Your Example Website or App
https://codesandbox.io/p/devbox/github/tanstack/router/tree/main/examples/react/start-basic-auth
Steps to Reproduce the Bug or Issue
- Clone example https://tanstack.com/start/latest/docs/framework/react/examples/start-basic-auth
- run
npm install && npm run build - run
node .output/server/index.mjs
If you had problem at step 3 due to no environment load, you can addcp .env ./.output/server/.envinto build script to pass this step - Launch
http://{your-ip}:3000
You will see the web app launched, but after signip/signup then click on Posts, it will bring you back to login again. Debug on fetchUser server func, it always return null session.
Expected behavior
User can access authed route after login in production build
Screenshots or Videos
No response
Platform
- OS: macOS
- Browser: Chrome
- Version: latest
Additional context
No response