mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 20:00:47 +00:00
fix(codex): durable OAuth refresh lifecycle
Add shared OAuth credential lifecycle manager with provider-aware refresh decisions. Implement CodexExecutor.refreshCredentials so 401/403 retry refresh works for Codex, track lastRefreshAt and refresh before the upstream stale-token window, preserve omitted idToken, and add per-connection single-flight refresh to avoid refresh-token rotation races. Merged from PR #1664. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
committed by
decolua
co-authored by
Cursor
parent
38b73bfc6b
commit
c233c7c8fc
@@ -163,6 +163,10 @@ export async function getProviderCredentials(provider, excludeConnectionIds = nu
|
||||
apiKey: connection.apiKey,
|
||||
accessToken: connection.accessToken,
|
||||
refreshToken: connection.refreshToken,
|
||||
idToken: connection.idToken,
|
||||
expiresAt: connection.expiresAt,
|
||||
expiresIn: connection.expiresIn,
|
||||
lastRefreshAt: connection.lastRefreshAt,
|
||||
projectId: connection.projectId,
|
||||
connectionName: connection.displayName || connection.name || connection.email || connection.id,
|
||||
copilotToken: connection.providerSpecificData?.copilotToken,
|
||||
|
||||
Reference in New Issue
Block a user