Skip to content

piyushmbm45/passportAuth

Repository files navigation

User Authentication

User Authentication Using Google, Facebook and Local Strategy

Table Of Content

Description

Personalized data is key to the success of many online businesses. Thus Authenticating of the users is the first step for such websites. This project implements the user authentication using multiple strategies like

  • Google account
  • Facebook account
  • Twitter account
  • Local sign up

To make things similar Passport Library is used in all login strategies.

Why Passport Library :-

Passport Library is very famous for authenticating the user. It has more than 500 strategies to authenticate user.

Technologies Framework

  • Nodejs 14.7.1
  • NPM 7.19.1
  • MongoDb 4.4.5
  • Bootstrap 4.4.1
  • Passport

Learning Objective

  • Passport, Express js, Node Js, MongoDb, Ejs Template, Java Script, Bootstrap etc.
  • How Async and Await works.
  • Hashing and Salting of password before saving password in Database
  • Express session Middleware for serialize and deserialize user
  • Flash Message - Like Password didn't Match, user already exists etc.
  • Env and EnvExample file
  • Facebook and Google Oauth 2.0 working.

Scope Of Functionalities

  • In any App Which require Sign In and Sign Up Process
  • Implementation of Google, Twitter and Facebook Authentication
  • Add more data on registration page like DOB, Profile Picture, Mobile No. etc.

Setup

  • To run this project, fork it.
  • Before running the server.js file first install the all dependencies in computer. You can see used dependencies in Package.json file.( or directly run npm i)
  • See env.example file and add environment variable according to it.
  • For local authentication - google, facebook and twitter API/APP keys not required
  • Good to go - run server.js file