feat(admin-web): proactively refresh access tokens before expiry

Track access token expires_at, dedupe concurrent refreshes, retry SSE on
401, and refresh on window focus/visibility so long-lived sessions stop
hitting the login redirect mid-task.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-25 16:48:15 +08:00
parent 4f3c39f5f5
commit 19527cdf42
6 changed files with 218 additions and 26 deletions
+1
View File
@@ -17,6 +17,7 @@ export interface ApiErrorEnvelope {
export interface AuthTokens {
accessToken: string;
refreshToken: string;
expiresAt?: number;
}
export interface LoginRequest {