Part 1 of this tutorial
i've been following your videos on Learn how to implement user sign up and login using PassportJS - Part 1 and part 2. When a new user signs up, i get "TypeError: req.flash is not a function" I've narrowed this down to the controllers\user.js file and the return newUser.save().then((results) => { passport.authenticate("local", { successRedirect: "/", failureRedirect: "/signup", failureFlash: true, })(res, req, next); function (and the login in equivalent). If i remove the last (res, req, next), the error msg goes away but the app hangs. What am i doing wrong? Is your source file available for me to compare with mine?