TODO: ignore the "not before" timestamps in JWT - some eons seem to have a slightly off RTC
parent
78f7ed77e0
commit
3ddd73ea45
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue