Files
jiu/client/lib/core/auth
wangjia b8567b0f4e fix(client): 切换账号显示上一账号数据——登录/登出按会话纪元重建 ProviderScope
张三登录后看到汤宇飞的订单列表(含已删行):业务 provider 的 notifier 实例
与 _cache 兜底缓存跨账号存活,拉取失败时把上一账号数据端给新账号(10 个
列表 provider 同款模式)。根治:会话纪元 sessionEpoch(Riverpod 体系外
ValueNotifier)作 ProviderScope 的 key,login/logout 后自增重建整棵状态树。
logout 的撤销会话 POST 改为不阻塞,确保清盘先于 scope 重建,防止新 scope
restore 读到旧 token 把上一账号登回来。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 00:39:18 +08:00
..