Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 1.17 KB

README.md

File metadata and controls

34 lines (26 loc) · 1.17 KB

Login and Register API

A REST API build for registering and login a user. It uses the Express for the routing, MongoDB as the database for storing the fields of an user along with fetching the user infor for authentication purpose, for the Authentication purpose we're using JWT(JSON Web Token).

Fields for Registering User

{
    first_name: { type: String, default: null },
    last_name: { type: String, default: null },
    email: { type: String, unique: true },
    password: { type: String },
    token: { type: String },
  }

View complete schema here

Login Flow

login-flow

Live API for Login and Registering

Free public API link is provided below where demonstration of this project can be seen

https://demo-api-ex.herokuapp.com/api/v1/register
https://demo-api-ex.herokuapp.com/api/v1/login

Registering using Postman

json-data-postman-register

Login using Postman

json-data-postman-register

Note - All data created and saved through this API in the database will be temporary. Please do not rely on this.