Guys where can I get an example of authentication using node js and mongodb and passportjs using the username and password entered in the text fields.I am unable to figure out the stuff given in passportjs website.Can I get a simple running example of this type and from where?
2 Answers
You could implement this feature even easier by using passport-local-mongoose that offers an integrated solution for passport, passport-local and a mongoose model. You can find documentation and examples at the github page.
Btw: I'm the author of this module.
Comments
Have you taken a look at this page of the passportjs guide?
2 Comments
ayyp
I'm confused about a few things on that page though... Where is everything stored? And how do you add a new user?
shelman
They are being stored in a database which is being hit by the User.findOne query in the first example on the page. Users would be added by making insert calls to the database.