Fix access token refreshing

This commit is contained in:
Gregory Schier
2025-03-06 07:00:11 -08:00
parent dfaeda224d
commit 493e844c01
@@ -22,7 +22,7 @@ export async function getOrRefreshAccessToken(ctx: Context, contextId: string, {
return null; return null;
} }
const now = (Date.now() / 1000); const now = Date.now();
const isExpired = token.expiresAt && now > token.expiresAt; const isExpired = token.expiresAt && now > token.expiresAt;
// Return the current access token if it's still valid // Return the current access token if it's still valid