diff --git a/frontend/src/middleware.ts b/frontend/src/middleware.ts index 5ae8a467..9038d338 100644 --- a/frontend/src/middleware.ts +++ b/frontend/src/middleware.ts @@ -2,11 +2,8 @@ import { withAuth } from "next-auth/middleware"; export default withAuth({ callbacks: { - authorized: ({ req, token }) => { - return ( - (!!token && !req.nextUrl.basePath.startsWith("/login")) || - !!process.env.NEXT_PUBLIC_NO_AUTH - ); + authorized: ({ token }) => { + return !!token || !!process.env.NEXT_PUBLIC_NO_AUTH; }, }, });