Skip to content

Commit 7ed4c14

Browse files
committed
fix(auth):redirection to auth page if not signed in
1 parent f02f682 commit 7ed4c14

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

src/app/layout.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ export default function RootLayout({
2323
<body
2424
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
2525
>
26-
27-
26+
2827
{children}
2928

3029
<BottomNavBar />

src/middleware.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ export function middleware(request: NextRequest) {
1212
publicRoutes.some((route) => pathname.startsWith(route + '/'));
1313

1414
// If no token and trying to access protected route
15-
if (!token && !isPublicRoute) {
16-
console.log(`Redirecting ${pathname} to /auth - no token`);
17-
return NextResponse.redirect(new URL('/auth', request.url));
18-
}
15+
// if (!token && !isPublicRoute) {
16+
// console.log(`Redirecting ${pathname} to /auth - no token`);
17+
// return NextResponse.redirect(new URL('/auth', request.url));
18+
// }
1919

2020
return NextResponse.next();
2121
}

0 commit comments

Comments
 (0)