passport-local mongoose code example
Example 1: passport local mongoose
const User = require('./models/user');
// CHANGE: USE "createStrategy" INSTEAD OF "authenticate"
passport.use(User.createStrategy());
passport.serializeUser(User.serializeUser());
passport.deserializeUser(User.deserializeUser());
Example 2: npm passport-local-mongoose
require('dotenv').config()