fix(logout): reduce unwanted API call during logout

- stop trying to refresh session
- display "successfully signed out" rather "your session is expired"
This commit is contained in:
Edouard Vanbelle
2026-08-09 13:47:47 +02:00
parent f4e923e381
commit bbef8afb7b
21 changed files with 191 additions and 106 deletions
+11
View File
@@ -119,6 +119,17 @@ class SessionStore {
this.user = null;
this.homeFolderId = null;
this.homeFolderName = null;
// Mark the store as `loaded` so any subsequent `session.load()` —
// notably the login page's existing-session probe and the root
// layout's post-nav mount — short-circuits to `null` instead of
// re-probing `/api/auth/me`. After an explicit logout we know for
// a fact the session is gone; a probe would 401, the interceptor
// would retry via /refresh (also 401), and `sessionExpiredHandler`
// would divert to `/login?source=session_expired` — clobbering the
// nice "logged out" landing. On a hard nav (natural expiry path)
// module state is fresh and this flag is `false` again, so the
// probe still runs there.
this.loaded = true;
}
}