As I promised before, today i’m going to talk about authentication with PassportJS. Passport is one of the capable node modules which can be used for local authentication or even using it for integrating with Facebook or Twitter and …
Basically in passport we set up some strategies and then pass the passport middleware into our application and then passport will take care of most of the things.
Strategies can be local for your local authentication , or Facebook for authentication with Facebook .
I’m going talk about Passport API a little bit and building a sample app which have local, Facebook and Twitter authentication. And also i’m going to use MongoDB as database of this application.
Application Overview :
- Installing Passport and adding to app
- Adding passport middlewares
- Database and Models
- Setting the strategies
- Function Handlers