Authentication in NodeJs using passport authentication middleware which covers brief introduction of the following:
- bcrypt-nodejs [to hash password]
- connect-flash [allows for passing session flashdata messages]
- passport [authentication middleware for nodejs]
- passport-local [passport local login]
- passport-facebook [to login with facebook]
- passport-google-oauth[to login with google]
- passport-twitter [to login with twitter]
- Hashing password using bcrypt-nodejs
- Passing session flashdata messages
- Using passport authentication middleware
This repo uses number of packages/modules:
- [https://www.npmjs.com/package/bcrypt-nodejs] - bcrypt-nodejs
- [https://github.com/jaredhanson/connect-flash] - connect-flash
- [http://passportjs.org/docs] - passport
It requires Node.js v7+ to run. Install the dependencies and devDependencies and start the server.
$ cd node-authentication-passport
$ npm install
$ npm start