#6264 - renewToken #1824

Merged
jsegarra merged 36 commits from 6264-renewToken into dev 2023-12-20 09:22:29 +00:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 784f5bb7f9 - Show all commits

View File

@ -3,7 +3,7 @@ const tokenConfig = require('./token-config');
module.exports = async token => {
const accessTokenConfig = await tokenConfig();
const now = new Date();
const now = Date.vnNew();
const differenceMilliseconds = now - token.created;
const differenceSeconds = Math.floor(differenceMilliseconds / 1000);
return differenceSeconds > accessTokenConfig.renewPeriod - accessTokenConfig.courtesyTime;