| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| data | ||
| prisma | ||
| sql | ||
| src | ||
| tests | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| .swcrc | ||
| Dockerfile | ||
| jest.config.cjs | ||
| nest-cli.json | ||
| package.json | ||
| tsconfig.build.json | ||
| tsconfig.json |
根因(对接方反复报的"用着用着登录已过期"): - 竞态:bootstrap 的"过期前 60s 自动刷"定时器直接调 refreshToken(),绕过 api-client 的 单飞锁 → 定时器与请求 401 兜底刷可能同时拿同一个一次性 refresh token 去换 → 一个成功 轮换(del 旧 jti),另一个拿已作废 jti → 10103 revoked → 误清会话。 - 盲区:api-client 运行期 clear() 路径无 client-diag 信标 → 服务端无日志、不触发企微告警。 改动: - lib/auth-diag.ts:抽出共享诊断信标(bootstrap 与 api-client 共用)。 - api-client.ts:两个 clear 点(refresh 被拒 / 受保护请求鉴权失败)补运行期掉线信标。 - use-auth-bootstrap.ts:过期定时器改走共享单飞 tryRefresh,消除双刷竞态。 - auth.service.ts:clientDiag 告警门控纳入 runtime-refresh-fail / runtime-auth-clear, alertSessionExpiry 增运行期根因文案与标题。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| data | Loading commit data... | |
| prisma | Loading commit data... | |
| sql | Loading commit data... | |
| src | Loading commit data... | |
| tests | Loading commit data... | |
| .dockerignore | Loading commit data... | |
| .env.example | Loading commit data... | |
| .gitignore | Loading commit data... | |
| .swcrc | Loading commit data... | |
| Dockerfile | Loading commit data... | |
| jest.config.cjs | Loading commit data... | |
| nest-cli.json | Loading commit data... | |
| package.json | Loading commit data... | |
| tsconfig.build.json | Loading commit data... | |
| tsconfig.json | Loading commit data... |