mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 01:40:21 +08:00
fix(oauth): 修复 OAuth 刷新后 Token 有效期不更新问题 (#324)
- 持久化刷新后的 `expires_at` 到 Provider Key SQL 更新链路 - 手动刷新接口优先返回本次刷新得到的过期时间 - 按当前 Key 字段重建 OAuth 状态快照,避免旧快照覆盖 - 前端刷新后防止旧列表数据回退覆盖新有效期
This commit is contained in:
@@ -1023,6 +1023,10 @@ pub(crate) fn provider_key_status_snapshot_payload(
|
||||
let mut snapshot = provider_key_status_snapshot_object(Some(&payload))
|
||||
.or_else(|| default_provider_key_status_snapshot().as_object().cloned())
|
||||
.unwrap_or_default();
|
||||
snapshot.insert(
|
||||
"oauth".to_string(),
|
||||
build_provider_key_oauth_status_snapshot(key),
|
||||
);
|
||||
snapshot.insert(
|
||||
"account".to_string(),
|
||||
build_provider_key_account_status_snapshot(key, provider_type),
|
||||
|
||||
Reference in New Issue
Block a user