I\'m using Node.js + Express + Passport to create a simple authentication(local)
and what I\'ve reached so far that when a wrong username or password entered user is re
Looks like you copied example from passportjs website, where Jared failed to mention how to implement it..
On the passport js github page he has another (simpler) example; he removed validPassword method altogether (line 18):
Example
if (user.password != password) { return cb(null, false); }
That's what I based my app on (using encryption) on top of it.