Skip to content

Commit 9ab448e

Browse files
committed
correct login routes
1 parent e8bfc32 commit 9ab448e

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

poliloom-gui/src/components/FetchInterceptor.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ export function FetchInterceptor() {
1414

1515
// Check for 401 responses and sign out to clear invalid session
1616
if (response.status === 401) {
17-
// Sign out to clear the invalid session
18-
// This will show the logged-out home page where users can manually sign in again
19-
await signOut({ redirect: false })
17+
await signOut({ callbackUrl: '/login' })
2018
}
2119

2220
return response

poliloom-gui/src/components/layout/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export function Header() {
106106
</Button>
107107
{status === 'authenticated' ? (
108108
<Button
109-
onClick={() => signOut({ callbackUrl: '/' })}
109+
onClick={() => signOut({ callbackUrl: '/login' })}
110110
variant="secondary"
111111
size="small"
112112
className="max-md:text-lg max-md:py-4 max-md:px-6 max-md:justify-start"

poliloom-gui/src/hooks/useAuthSession.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ export function useAuthSession() {
66

77
useEffect(() => {
88
if (session?.error === 'RefreshAccessTokenError') {
9-
// Redirect to home page when refresh token is expired or missing
10-
signOut({ callbackUrl: '/' })
9+
// Redirect to login page when refresh token is expired or missing
10+
signOut({ callbackUrl: '/login' })
1111
}
1212
}, [session])
1313

0 commit comments

Comments
 (0)