Passport-jwt Unauthorized

后端 未结 2 718
一向
一向 2021-01-15 13:28

I\'m New to node js. I\'m using passport jwt for authentication. When i tried to authenticate, its always showing \"unauthorized\".

my passport.js file

2条回答
  •  春和景丽
    2021-01-15 14:08

    I found out the issue, In new passport-jwt updates, we have to use

    opts.jwtFromRequest = ExtractJwt.fromAuthHeaderWithScheme('jwt');
    

提交回复
热议问题