TODO: ignore the "not before" timestamps in JWT - some eons seem to have a slightly off RTC

pull/4/head
Florian Brede 2021-09-29 23:43:23 +02:00
parent 78f7ed77e0
commit 3ddd73ea45
1 changed files with 2 additions and 2 deletions

View File

@ -6,9 +6,9 @@ let logger;
async function validateJWT(token, key) {
try {
return jwt.verify(token.replace("JWT ", ""), key, {algorithms: ['RS256']});
return jwt.verify(token.replace("JWT ", ""), key, {algorithms: ['RS256'], ignoreNotBefore: true});
} catch (exception) {
//logger.warn(exception)
logger.warn(exception)
}
return null;
}