Closed tkimvu closed 2 weeks ago
For better context;
The redirect
thrown in the beforeLoad
callback in the _auth.tsx layout route, isn't correctly being resolving the redirect when you directly visit the URL (for example to /dashboard
).
Tanner has fixed this and it's available in 1.31.5 release.
Describe the bug
In latest authenticated-routes example. When click to dashboard link from index, that work. But if write direct url like http://localhost:3001/dashboard => url redirect to http://localhost:3001/login?redirect=%2Fdashboard BUT auth layout loaded with isAuthenticated: false
Your Example Website or App
https://github.com/tanstack/router/tree/main/examples/react/authenticated-routes
Steps to Reproduce the Bug or Issue
Clone and open
Expected behavior
I want throw redirect to login
Screenshots or Videos
Platform
Additional context
No response