Skip to content

Commit

Permalink
fix: logic error in route handling
Browse files Browse the repository at this point in the history
  • Loading branch information
JoblersTune committed Aug 22, 2024
1 parent 1e91c2d commit 32fa66c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/frontend/app/lib/kratos_checks.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 32fa66c

Please sign in to comment.