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
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:
@@ -133,10 +133,10 @@ const TokenInjector: React.FC<{ children: React.ReactNode }> = ({ children }) =>
|
|||||||
const { indexedDBStorage } = await import('../utils/indexeddb-storage');
|
const { indexedDBStorage } = await import('../utils/indexeddb-storage');
|
||||||
await indexedDBStorage.clearAll();
|
await indexedDBStorage.clearAll();
|
||||||
logout({ openUrl: false });
|
logout({ openUrl: false });
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
} finally {
|
||||||
|
validatingRef.current = false;
|
||||||
}
|
}
|
||||||
validatingRef.current = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
validateToken();
|
validateToken();
|
||||||
|
|||||||
@@ -170,7 +170,14 @@ class IndexedDBStorage implements StorageAdapter, Auth0Cache {
|
|||||||
this.memoryCache.clear();
|
this.memoryCache.clear();
|
||||||
resolve();
|
resolve();
|
||||||
};
|
};
|
||||||
tx.onerror = () => reject(tx.error);
|
tx.onerror = () => {
|
||||||
|
this.memoryCache.clear();
|
||||||
|
reject(tx.error);
|
||||||
|
};
|
||||||
|
tx.onabort = () => {
|
||||||
|
this.memoryCache.clear();
|
||||||
|
reject(new Error('Transaction aborted'));
|
||||||
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user