1

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 2

3

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.

Sign up to request clarification or add additional context in comments.

Comments

3

Have you taken a look at this page of the passportjs guide?

http://passportjs.org/guide/username-password.html

2 Comments

I'm confused about a few things on that page though... Where is everything stored? And how do you add a new user?
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.