实现客户端登录七天滑动续期

需求:解决短效访问令牌到期后客户端一小时掉登录的问题。

实现:由 Electron Main 加密管理并轮换刷新凭据,按真实用户活动续期,七天闲置后清理会话,并补齐并发、迁移和终态回归测试。
This commit is contained in:
2026-08-07 16:11:10 +08:00
parent 7b23cce67a
commit 86ece3a430
20 changed files with 2941 additions and 326 deletions

2
shared/auth-session.ts Normal file
View File

@@ -0,0 +1,2 @@
export const WORKS_SQUARE_SESSION_IDLE_TIMEOUT_MS = 7 * 24 * 60 * 60 * 1000;
export const WORKS_SQUARE_ACTIVITY_SYNC_INTERVAL_MS = 60_000;