From 50692ee6fe0d8cb1778a79e219695caf91805894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Dere=C5=BEi=C4=87?= Date: Fri, 16 Feb 2024 17:12:08 +0100 Subject: [PATCH] komentiranje koda --- middleware.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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();