Fix access token refreshing

This commit is contained in:
Gregory Schier
2025-03-06 07:00:11 -08:00
parent dfaeda224d
commit 493e844c01

View File

@@ -22,7 +22,7 @@ export async function getOrRefreshAccessToken(ctx: Context, contextId: string, {
return null;
}
const now = (Date.now() / 1000);
const now = Date.now();
const isExpired = token.expiresAt && now > token.expiresAt;
// Return the current access token if it's still valid