jaredhanson / passport

Simple, unobtrusive authentication for Node.js.
https://www.passportjs.org?utm_source=github&utm_medium=referral&utm_campaign=passport&utm_content=about
MIT License
22.92k stars 1.24k forks source link

Add an end-to-end example to Readme #534

Open danielkhan opened 7 years ago

danielkhan commented 7 years ago

I guess simply adding var LocalStrategy = require('passport-local').Strategy; to the sample would lower the barrier for new users drastically.

garrrettt commented 7 years ago

I've just started learning about Passport, and the main thing that confuses me is about the sessions and why serialize user only has to be called once in the entire program (outside of the routes). At this point, I assume that calling serializeUser() does something that serializes every request.

codypearce commented 7 years ago

I agree that would help, but the readme does already link to 4 tutorials with 4 examples, as well as the links to each strategies' repo. The official docs are also a great resource.

Perhaps the readme could go into a little more detail though.