From 32fa66c694f0ba80e945bbf30c04514a9a1939ca Mon Sep 17 00:00:00 2001 From: JoblersTune Date: Thu, 22 Aug 2024 12:04:35 +0200 Subject: [PATCH] fix: logic error in route handling --- packages/frontend/app/lib/kratos_checks.server.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/frontend/app/lib/kratos_checks.server.ts b/packages/frontend/app/lib/kratos_checks.server.ts index 215447d2c0..a31ff907a9 100644 --- a/packages/frontend/app/lib/kratos_checks.server.ts +++ b/packages/frontend/app/lib/kratos_checks.server.ts @@ -40,7 +40,10 @@ export async function checkAuthAndRedirect( throw redirect('/') } else { const loggedIn = await isLoggedIn(cookieHeader) - if (loggedIn && !isLogoutPage) { + if (loggedIn) { + if(isLogoutPage) { + return + } throw redirect('/') } return