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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
Vue:登录页面及登录页面用到的验证函数
登錄頁面: <template> <div id="login"> <div class="login-wrap"> <ul class="menu-tab"> <li v-for="item
Nginx解决VUE的history模式下刷新404
原配置: location / { root /root/jxiaoshuai-blog-demo/; index index.html index.htm; } 使用try_files解決: lo
24小時熱門文章