Skip to content

aamir4813/nodejs-auth2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NodeJS-SignIn-Register & Google-oAuth2

Table of Contents

About

Login and Register template with Google-oAuth2 Authentication , login , Register backend by NodeJs (Express) And MongoDB was used to store the data.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment

Prerequisites

  basic knowledge of ExpressJS
  npm
  git
  Google-oAuth2 API
  MongoDB Client or MongoDB Atlast(in my case)

Installing

A step by step series of examples that tell you how to get a development env running.

 
  git clone 
  cd nodejs-auth2/
  npm i
  npm start

Create a .env file for dotenv-Config

  DB_CONNECT = value
  GOOGLE_CLIENT_ID = value
  GOOGLE_CLIENT_KEY = value
  GOOGLE_CALLBACK_URL = http://localhost:3000/auth/google/callbacks (in my case ..)
  and just go to :  http://localhost:3000/

Usage

Following Routes are Available:
http://localhost:3000 + address

address : /
address : /access  [GET] {if Google Login is successful}
address : /failed  [GET] {if Google Login failed}
address : /logout  [GET] {to logout google login}
address : /auth/google [GET] {to login in to Google account}
address : /api/user/register [POST] {normal register}
address : /api/user/login  [POST] {normal login}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published