File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,9 +73,10 @@ export default function WorkspacePage() {
7373 useEffect ( ( ) => {
7474 if ( isSessionPending || hasRedirectedRef . current ) return
7575
76- if ( sessionError ) return
77-
7876 if ( ! session ?. user ) {
77+ // Indeterminate auth (errored session query, no cached identity): show
78+ // the error card — /login would bounce back while a session cookie exists.
79+ if ( sessionError ) return
7980 logger . info ( 'User not authenticated, redirecting to login' )
8081 router . replace ( '/login' )
8182 return
@@ -113,7 +114,7 @@ export default function WorkspacePage() {
113114
114115 const failedToLoad =
115116 recoveryFailed ||
116- Boolean ( sessionError ) ||
117+ ( Boolean ( sessionError ) && ! session ?. user ) ||
117118 ( isAuthenticated && Boolean ( workspacesError ) && ! isStaleSessionError ( workspacesError ) )
118119
119120 if ( failedToLoad ) {
You can’t perform that action at this time.
0 commit comments