patrickvaler / express-jwt-acl-mongoose-starter

Basic setup of express with JWT authentication (passport, passport-jwt), access control lists (node_acl) and Mongoose, written in ES6.
MIT License
7 stars 1 forks source link

formAuthHeader is not a function #7

Open aashirjaved-zz opened 5 years ago

aashirjaved-zz commented 5 years ago
jwtFromRequest: _passportJwt2.default.ExtractJwt.fromAuthHeader(),
                                                     ^

TypeError: _passportJwt2.default.ExtractJwt.fromAuthHeader is not a function
    at Object.setJwtStrategy (/Users/alihamza/Documents/github/express-jwt-acl-mongoose-starter/src/config/auth.js:14:44)
    at Object.<anonymous> (/Users/alihamza/Documents/github/express-jwt-acl-mongoose-starter/src/server.js:18:6)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at loader (/Users/alihamza/Documents/github/express-jwt-acl-mongoose-starter/node_modules/babel-register/lib/node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/alihamza/Documents/github/express-jwt-acl-mongoose-starter/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at Object.<anonymous> (/Users/alihamza/Documents/github/express-jwt-acl-mongoose-starter/node_modules/babel-cli/lib/_babel-node.js:154:22)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)