1// requires the model with Passport-Local Mongoose plugged in
2const User = require('./models/user');
3
4// use static authenticate method of model in LocalStrategy
5passport.use(new LocalStrategy(User.authenticate()));
6
7// use static serialize and deserialize of model for passport session support
8passport.serializeUser(User.serializeUser());
9passport.deserializeUser(User.deserializeUser());