草庐IT

jwtStrategy

全部标签

node.js - NodeJS jwtStrategy 需要一个函数来从请求错误中检索 jwt

我从https://devdactic.com/restful-api-user-authentication-1/学习了教程。但是我在这部分有错误passport.use(newJwtStrategy(opts,function(jwt_payload,done)这是我运行Node“server.js”时的错误/home/chibi/Documents/connect/project/node_modules/passport-jwt/lib/strategy.js:39thrownewTypeError('JwtStrategyrequiresafunctiontoretrieve

node.js - NodeJS jwtStrategy 需要一个函数来从请求错误中检索 jwt

我从https://devdactic.com/restful-api-user-authentication-1/学习了教程。但是我在这部分有错误passport.use(newJwtStrategy(opts,function(jwt_payload,done)这是我运行Node“server.js”时的错误/home/chibi/Documents/connect/project/node_modules/passport-jwt/lib/strategy.js:39thrownewTypeError('JwtStrategyrequiresafunctiontoretrieve