fixed backwards logic

This commit is contained in:
Miodec 2022-09-25 18:17:10 +02:00
parent e9503a24c2
commit 4f146ae5a8

View file

@ -26,7 +26,7 @@ export async function verifyIdToken(idToken: string): Promise<DecodedIdToken> {
if (cached) {
const expirationDate = cached.exp * 1000 - TOKEN_CACHE_BUFFER;
if (expirationDate > Date.now()) {
if (expirationDate < Date.now()) {
recordTokenCacheAccess("hit_expired");
tokenCache.delete(idToken);
} else {