const User = require('./models/user'); // CHANGE: USE "createStrategy" INSTEAD OF "authenticate" passport.use(User.createStrategy()); passport.serializeUser(User.serializeUser()); passport.deserializeUser(User.deserializeUser());