Skip to content

dollpriyanka/Node_Authentication_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node_Authentication_API

Nodejs API for Authentication

Tech Stack

* Express.js
* Handlebars
* MySQL
* JWT (Json Web Token)

Get Started

  1. Clone this repository
git clone https://github.com/dollpriyanka/Node_Authentication_API
  1. Go to the cloned directory
  2. Initialize the directory
npm init -y
  1. Install dependencies
npm install

API USED

POST/login:
       To login a user we need to send email and password of the user in http body
POST/sign-up:
       To signup a user we need to send name, email, password of the user in http body
POST/forgot_password:
       If a user forgot their password we need to send email and get a token in the http body
PATCH/reset_password:
       Using forgot_password email we need to generate new password using http body

Input_and_Output

    
          1.Sign-up:
                  Http body: {
                    "name":"Jack Melson",
                    "email": "test@gmail.com",
                    "password":"test123$",
                    "confirm password":"test123$"
                  }
                  Response: {
                    "token": "yjgsjjsgysy789fehfhklijlejlejrljlwjkwjkjwrkljrlrjfks,s,gggn,k"
                  }
          2.Login:
                  Http body: {
                    "email": "test@gmail.com",
                    "password":"test123$"
                  }
                  Response: {
                    "token": "yjgsjjsgysy789fehfhklijlejlejrljlwjkwjkjwrkljrlrjfks,s,gggn,k"
                  }
          3.Forgot_Password:
                  Http body: {
                    "email": "test@gmail.com"
                  }
                  Response: {
                    "token": "yjgsjjsgysy789fehfhklijlejlejrljlwjkwjkjwrkljrlrjfks,s,gggn,k"
                  }
          4.Reset_Password:
                  Http body: {
                    "password":"test123$"
                  }
                  Response: {
                    "token": "yjgsjjsgysy789fehfhklijlejlejrljlwjkwjkjwrkljrlrjfks,s,gggn,k"
                  }