Files
pangolin/web
wangjia 09b1944376 fix(usercenter): 续期失败时清本地会话,修主页↔登录页来回刷
根因:引导时 api.refresh() 失败(refresh token 过期/被撤销/Redis 丢 JTI 白名单)
只 setAuthed(false),没清 localStorage 的 pg_uc_refresh/pg_uc_email → 官网仍据此
显示'用户中心' → 点进 /user/ 又续期失败回登录页 → 来回刷。

修:catch 里加 clearSession() 清掉残留 token,官网随即回到'Log in',状态一致、
不再来回刷。(登录态正常保持 30 天=refresh token TTL;失败多因会话真失效。)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 14:23:35 +08:00
..