mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-07-08 13:55:14 +02:00
Fix access token refreshing
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user