Skip to content

fix: recover from expired Drive sessions instead of silently going stale - #192

Merged
tzebrowski merged 1 commit into
mainfrom
fix/drive-session-expiry-logout
Aug 16, 2026
Merged

fix: recover from expired Drive sessions instead of silently going stale#192
tzebrowski merged 1 commit into
mainfrom
fix/drive-session-expiry-logout

Conversation

@tzebrowski

Copy link
Copy Markdown
Owner

DriveService.findFolderId() swallowed every API error, including 401/403, and reported an expired token as "Required Drive folders not found" -- so AuthService.signOut() never fired, isLoggedIn stayed true, and the only way to refresh was a manual logout/login.

Real errors now propagate to listFiles(), which first tries AuthService.silentRefresh() (a popup-free token refresh) and retries once before giving up, so routine hourly token expiry recovers invisibly. Only if that fails does it sign out of both AuthService (Drive) and AccountService (My Giulia account/top-nav) together, so the UI doesn't keep showing the user as signed in with an empty file list.

DriveService.findFolderId() swallowed every API error, including
401/403, and reported an expired token as "Required Drive folders not
found" -- so AuthService.signOut() never fired, isLoggedIn stayed
true, and the only way to refresh was a manual logout/login.

Real errors now propagate to listFiles(), which first tries
AuthService.silentRefresh() (a popup-free token refresh) and retries
once before giving up, so routine hourly token expiry recovers
invisibly. Only if that fails does it sign out of both AuthService
(Drive) and AccountService (My Giulia account/top-nav) together, so
the UI doesn't keep showing the user as signed in with an empty file
list.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@tzebrowski
tzebrowski merged commit 71c554b into main Aug 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant