fix: address QR review findings for token validation and clearAll reliability (refs #190)
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 3m32s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 22s
Deploy to Staging / Verify Staging (pull_request) Successful in 8s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 7s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Eric Gullickson
2026-02-14 21:59:31 -06:00
parent 15128bfd50
commit db127eb24c
2 changed files with 10 additions and 3 deletions

View File

@@ -133,10 +133,10 @@ const TokenInjector: React.FC<{ children: React.ReactNode }> = ({ children }) =>
const { indexedDBStorage } = await import('../utils/indexeddb-storage');
await indexedDBStorage.clearAll();
logout({ openUrl: false });
return;
}
}
} finally {
validatingRef.current = false;
}
};
validateToken();

View File

@@ -170,7 +170,14 @@ class IndexedDBStorage implements StorageAdapter, Auth0Cache {
this.memoryCache.clear();
resolve();
};
tx.onerror = () => reject(tx.error);
tx.onerror = () => {
this.memoryCache.clear();
reject(tx.error);
};
tx.onabort = () => {
this.memoryCache.clear();
reject(new Error('Transaction aborted'));
};
});
}