You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a setup where I have a group of routes called _app which all my authenticated routes are grouped into. In the beforeLoad of the _app.tsx I'm doing my auth check and if the user is not authenticated, they will be redirect to /login. This works fine when running in dev mode but running the compiled output you won't be redirected and only get a blank white page when going to /dashboard.
It feels like it could be somehow related to this issue here: #1295
I can also confirm that it does work when not using Bun. Removing server: { preset: "bun" } from my app.config.ts and then building + running it via node does resolve the issue when running the prod output.
The dashboard route is protected and always redirects you to /login. It works as expected when running bun run dev but in the compiled output it just sends a blank page on the /dashboard path and does not redirect the user.
Expected behavior
Going to /dashboard should redirect me to /login.
Screenshots or Videos
No response
Platform
OS: MacOS 14.4.1
Browser: Chromium
Version: 131.0.6778.108
Additional context
No response
The text was updated successfully, but these errors were encountered:
Which project does this relate to?
Start
Describe the bug
I have a setup where I have a group of routes called
_app
which all my authenticated routes are grouped into. In thebeforeLoad
of the_app.tsx
I'm doing my auth check and if the user is not authenticated, they will be redirect to/login
. This works fine when running in dev mode but running the compiled output you won't be redirected and only get a blank white page when going to/dashboard
.It feels like it could be somehow related to this issue here: #1295
I can also confirm that it does work when not using Bun. Removing
server: { preset: "bun" }
from myapp.config.ts
and then building + running it via node does resolve the issue when running the prod output.Your Example Website or App
https://codesandbox.io/p/devbox/krp8d5
Steps to Reproduce the Bug or Issue
bun run build
bun run .output/server/index.mjs
/dashboard
The dashboard route is protected and always redirects you to
/login
. It works as expected when runningbun run dev
but in the compiled output it just sends a blank page on the/dashboard
path and does not redirect the user.Expected behavior
Going to
/dashboard
should redirect me to/login
.Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: