File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed
Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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"
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments