Skip to content
Permalink
Browse files

Upgrade passport-jwt version.

  • Loading branch information...
n1try committed Sep 3, 2019
1 parent d28d396 commit ba66973c44c82d825257d9527321125593601e98
Showing with 23 additions and 5 deletions.
  1. +2 −1 config/passport.js
  2. +20 −3 package-lock.json
  3. +1 −1 package.json
@@ -2,6 +2,7 @@ var LocalStrategy = require('passport-local').Strategy
, JwtStrategy = require('passport-jwt').Strategy
, FacebookStrategy = require('passport-facebook').Strategy
, GoogleStrategy = require('passport-google-oauth').OAuth2Strategy
, ExtractJwt = require('passport-jwt').ExtractJwt
, User = require('../app/models/user')
, config = require('./config')
, authConfig = require('./auth');
@@ -76,7 +77,7 @@ module.exports = function(passport) {
// =========================================================================
var opts = {
secretOrKey : config.secret,
authScheme : 'Bearer'
jwtFromRequest: ExtractJwt.fromAuthHeaderWithScheme('Bearer')
};
passport.use(new JwtStrategy(opts, function(jwt_payload, done) {
var strategy = jwt_payload.strategy

Some generated files are not rendered by default. Learn more.

@@ -28,7 +28,7 @@
"passport": "0.3.2",
"passport-facebook": "2.0.0",
"passport-google-oauth": "0.2.0",
"passport-jwt": "1.2.1",
"passport-jwt": "2.1.0",
"passport-local": "1.0.0",
"safe-browse-url-lookup": "0.0.3",
"serve-favicon": "2.3.0",

0 comments on commit ba66973

Please sign in to comment.
You can’t perform that action at this time.