a
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
commit 31d537735d3c5e25a2b620d63ebbfea4cf84f57e
|
commit 02b80dd74e2f962fffc9b0076bb7966eea4e45ff
|
||||||
Author: Simon Gardling <titaniumtown@proton.me>
|
Author: Simon Gardling <titaniumtown@proton.me>
|
||||||
Date: Wed Apr 8 13:05:09 2026 -0400
|
Date: Wed Apr 8 13:05:09 2026 -0400
|
||||||
|
|
||||||
@@ -20,10 +20,10 @@ index 3f50b7bd4..248dacbff 100644
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
diff --git a/packages/ai/src/auth-storage.ts b/packages/ai/src/auth-storage.ts
|
diff --git a/packages/ai/src/auth-storage.ts b/packages/ai/src/auth-storage.ts
|
||||||
index 9fdb4473b..fac936dad 100644
|
index 9fdb4473b..fc81a6f3b 100644
|
||||||
--- a/packages/ai/src/auth-storage.ts
|
--- a/packages/ai/src/auth-storage.ts
|
||||||
+++ b/packages/ai/src/auth-storage.ts
|
+++ b/packages/ai/src/auth-storage.ts
|
||||||
@@ -1865,7 +1865,30 @@ export class AuthStorage {
|
@@ -1865,7 +1865,35 @@ export class AuthStorage {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isDefinitiveFailure) {
|
if (isDefinitiveFailure) {
|
||||||
@@ -44,6 +44,11 @@ index 9fdb4473b..fac936dad 100644
|
|||||||
+ ) {
|
+ ) {
|
||||||
+ // DB has a newer refresh token — another instance refreshed.
|
+ // DB has a newer refresh token — another instance refreshed.
|
||||||
+ // Update in-memory state and retry with the fresh credential.
|
+ // Update in-memory state and retry with the fresh credential.
|
||||||
|
+ logger.warn("Concurrent refresh detected, syncing from DB and retrying", {
|
||||||
|
+ provider,
|
||||||
|
+ index: selection.index,
|
||||||
|
+ rowId: entry.id,
|
||||||
|
+ });
|
||||||
+ const updated = [...entries];
|
+ const updated = [...entries];
|
||||||
+ updated[selection.index] = { id: entry.id, credential: dbEntry.credential };
|
+ updated[selection.index] = { id: entry.id, credential: dbEntry.credential };
|
||||||
+ this.#setStoredCredentials(provider, updated);
|
+ this.#setStoredCredentials(provider, updated);
|
||||||
|
|||||||
Reference in New Issue
Block a user