feat(auth): 微信 session_key 迁移到 Redis — 内存降级兜底
session_key 从全局 HashMap 迁移到 Redis(SET key EX 300 / GETDEL), Redis 不可用时自动降级到内存缓存,提升多实例部署安全性。
This commit is contained in:
@@ -57,6 +57,7 @@ impl FromRef<AppState> for erp_auth::AuthState {
|
||||
default_tenant_id: state.default_tenant_id,
|
||||
wechat_appid: state.config.wechat.appid.clone(),
|
||||
wechat_secret: state.config.wechat.secret.clone(),
|
||||
redis: Some(state.redis.clone()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user