Learn how to implement user sign up and login using PassportJS - Part 1

    Set up PassportJS and User model infrastructure for implementing login/signup routes.

    Bahadir Balban

    Started Tech Buzz

    @learningexpressjs

    Part 1 of this tutorial



    Did you like this episode?

    Buzz it and share it with your friends

    Buzz0

    You Might Also Like...


    Join The Discussion

    nimara aramin

    @nimara

    May 10

    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?