Skip to content

OAuth(or Open Authorization) is the approach for authenticating end-user. It makes your application much easier and handy for an end-user, as they can eaily choose a social login (Facebook, Google or Twitter) to signup, instead of filling a boring traditional form with some labels & inputs.

shivamv12/NodeJsSocialAuthentication

Repository files navigation

🔐 NodeJs Social Authentication

OAuth(or Open Authorization) is the approach for authenticating end-user. It makes your application much easier and handy for an end-user, as they can eaily choose a social login (Facebook, Google or Twitter and so forth) to signup, instead of filling a boring traditional form with some labels & inputs.

💻 Prerequisites

  • You must have a good knowledge of NodeJs.
    • (How nodejs works, how their middleware helps to intercept the requests, how to handle routes in Nodejs etc.)
  • You should have a basic idea of How OAuth Works.
  • At last but not least, MongoDB basic query (CRUD) knowledge & some mongo driver (like Mongoose) to connect NodeJs to MongoDB Server.

🌀 Clone the Repository

By running the following command on your terminal you will be able to clone this repository.

/$ git clone https://github.com/shivamv12/NodeJsSocialAuthentication.git

After clone the repository, go inside the repo-folder & install all the project dependencies. 🏗

/$ cd NodeJsSocialAuthentication ↵ 
/NodeJsSocialAuthentication $ npm i

Once you install all the dependecies, only thing you need to do is, create environment file and provide all the key's value. (For reference, there is one .env.example file available, there you will find all the required KEYS to run this project.)

For Twitter API Keys/Secret: Create Project/App
For Google API Keys/Secret: Create Project/App
For Facebook / Instagram API Keys/Secret: Create Project/App

After getting all the API keys/secret paste them inside .env file. And run your project using following command.

/NodeJsSocialAuthentication $ npm run dev

After successfully running the project, you will see following screen.

Screenshot from 2021-05-16 15-07-08

About

OAuth(or Open Authorization) is the approach for authenticating end-user. It makes your application much easier and handy for an end-user, as they can eaily choose a social login (Facebook, Google or Twitter) to signup, instead of filling a boring traditional form with some labels & inputs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published