PassportJS — The Confusing Parts Explained
▻https://hackernoon.com/passportjs-the-confusing-parts-explained-edca874ebead?source=rss----3a81
PassportJS is awesome. It provides an abstraction layer over logging in with various providers such as Facebook, Google, Github, Twitter and more.When first getting started though it can be a little challenging to understand what’s going on and why. Their documentation is pretty good but leaves out some specifics that I initially found difficult to understand. Hopefully this helps answer some of your questions and clears up some confusion. I assume you’ve read the docs a little and have maybe tried implementing it. Even if you haven’t though, you should still be able to follow along. Even if you have, this should still prove useful in understanding PassportJS a little better.Here’s what’s coveredThe Callback Function in Strategy SetupWhy #passport.authenticate() is needed in the (...)