We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f31fe0 commit 9e58bc4Copy full SHA for 9e58bc4
1 file changed
apps/graduate/src/routes/__root.tsx
@@ -16,7 +16,11 @@ export interface AuthContext {
16
17
export const Route = createRootRouteWithContext<AuthContext>()({
18
beforeLoad: ({ context, location }) => {
19
- if (!context.auth.isAuthenticated && location.pathname !== '/login') {
+ if (location.pathname === '/login' || location.pathname === '/signup') {
20
+ return;
21
+ }
22
+
23
+ if (!context.auth.isAuthenticated) {
24
throw redirect({
25
to: '/login',
26
});
0 commit comments