diff --git a/middleware.ts b/middleware.ts index b2ab9a4..867b6fb 100644 --- a/middleware.ts +++ b/middleware.ts @@ -25,7 +25,10 @@ export default async function middleware(req: NextRequest) { ); const isPublicPage = publicPathnameRegex.test(req.nextUrl.pathname); - // for punlic pages we call only localisation middleware + // for public pages we call only localisation middleware + // this is not an official way to do it - it's a hack + // based on https://github.com/nextauthjs/next-auth/discussions/8961 + // The official way of chaining middlewares in AuthJS v5 does not work and is not fully documented if (!isPublicPage) { const session = await auth();