Closed jmandivarapu1 closed 6 years ago
I need help regarding as i struck at this point.there is no other option for me otherthan extracting the token from the URL.
my requested url is http://localhost:3000/api/deal?token=JWTeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ93KktUvltKS4h89Oyv5LMKYwiBP3GvU8
let opts = {}; opts.jwtFromRequest = ExtractJwt.fromUrlQueryParameter('token') opts.secretOrKey = config.secret;
passport.use(new JwtStrategy(opts, function(jwt_payload, done) { const jwt_user_id = jwt_payload._doc._id User.findById(jwt_user_id, function(err, user) { if (err) { return done(err, false); } if (user) { done(null, user); } else { done(null, false); } }); }));
There is not enough information for me to help. Can you provide a simplified app.js and package.json that reproduces the issue.
Closing, no response.
I need help regarding as i struck at this point.there is no other option for me otherthan extracting the token from the URL.
my requested url is http://localhost:3000/api/deal?token=JWTeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ93KktUvltKS4h89Oyv5LMKYwiBP3GvU8