Skip to content

Latest commit

 

History

History
52 lines (32 loc) · 1.46 KB

README.md

File metadata and controls

52 lines (32 loc) · 1.46 KB

MongoDB Auth API

Last Updated: 07/05/2020

Buy Me A Pack of Cookies

An Authentication API with MongoDB Application.

How to install?

git clone https://github.com/soyabn09/mongodb-auth-api.git
npm install or yarn install
yarn start

Create a .env file and copy + paste the code below

MONGODB_URL= 
JWT_KEY=
PORT=

MONGODB_URL - The mongodb connection URL which you get from mongo.

JWT_KEY - Make this secretive. Can be something like this S3CR3TK3YNOTSHAR3.

PORT - Self explanatory.

Demo: https://soyab-mongodb-auth.glitch.me/

How does it work?

Register

Register Form

You input the following values into the boxes and it then gets stored on the mongo database and return with a success code.

Login

Login Form

You input the values you used during registration and returns your name Hello John Smith.

To Do List:

  • Save Session on device
  • User Profile Page
  • Logout User - Clears user token on the existing session from the database
  • Logout User from all devices - Clears all user tokens from the database