fix(oauth): 修复 OAuth 刷新后 Token 有效期不更新问题 (#324)

- 持久化刷新后的 `expires_at` 到 Provider Key SQL 更新链路
- 手动刷新接口优先返回本次刷新得到的过期时间
- 按当前 Key 字段重建 OAuth 状态快照,避免旧快照覆盖
- 前端刷新后防止旧列表数据回退覆盖新有效期
This commit is contained in:
AAEE86
2026-04-24 09:35:25 +08:00
committed by GitHub
parent 31e871fe1b
commit a9d10163af
8 changed files with 70 additions and 18 deletions

View File

@@ -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),