Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config/passport.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const JwtStrategy = require('passport-jwt').Strategy;
const LocalStrategy = require('passport-local').Strategy;
const ExtractJwt = require('passport-jwt').ExtractJwt;
const User = require('../models/user');
const config = require('../config/database');
Expand All @@ -17,7 +17,7 @@ passport.deserializeUser((id, done) =>{
opts.jwtFromRequest = ExtractJwt.fromAuthHeaderWithScheme('jwt');
opts.secretOrKey = 'newpassword';
passport.use(
new JwtStrategy(opts, (jwt_payload, done) => {
new LocalStrategy(opts, (jwt_payload, done) => {
User.getUserById( jwt_payload._doc._id, (err, user) => {
if (err) {
return done(err, false);
Expand Down