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