nodejs jsonwebtoken verify方法报错jwt not active
err = {
name: ‘NotBeforeError’,
message: ‘jwt not active’,
date: 2018-10-04T16:10:44.000Z
}
由于服务器时间差导致 jwt 报 jwt not active
解决:将jsonwebtoken verify的ignoreNotBefore 设置为 true
const decoded = jwt.verify(token, wrong-secret, {ignoreNotBefore: true},callback);
参考:
https://github.com/auth0/node-jsonwebtoken
nodejs jsonwebtoken verify报错 jwt not active
最新推荐文章于 2024-07-02 09:23:31 发布