fix(db): keep tokenExpiresAt when a connection is created (#11368)

Validated in a combined-batch worktree off release/v3.8.51 tip alongside #11259 and the cherry-picked #11323 successor (#11493):
- Focused test: tests/unit/oauth-connection-tokenexpiresat-5326.test.ts — 3/3 pass, exercises the round-trip through createProviderConnection/getProviderConnections
- typecheck:core, file-size, changelog-integrity, complexity, cognitive-complexity gates — all OK
- One-string allowlist fix, TDD-proven (fails on base with tokenExpiresAt: null, passes with the change), mutation-checked

Thanks for restoring #5326's fix end to end — clean, minimal, well-tested.
This commit is contained in:
Nguyen Thanh Dat
2026-08-25 17:18:58 +07:00
committed by GitHub
parent 6435f618f4
commit 23fa2709a9
3 changed files with 53 additions and 6 deletions

View File

@@ -625,6 +625,10 @@ export async function createProviderConnection(data: JsonRecord) {
"accessToken",
"refreshToken",
"expiresAt",
// #5326's payload sets this and _insertConnectionRow binds it, but it was
// missing from this allowlist — so every created row stored NULL however good
// the payload was. The update path already carries it (`data.tokenExpiresAt`).
"tokenExpiresAt",
"tokenType",
"scope",
"idToken",