Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 814 Bytes

README.md

File metadata and controls

39 lines (25 loc) · 814 Bytes

Authentication Server

Store user name and password (salt + hash) in mongodb.

  • Install mongodb: https://docs.mongodb.com/manual/installation/

  • Install a query tool for mongodb eg. https://robomongo.org/ (note latest version will be a paid version, older versions are free)

  • Create a local file in root for storing a secret key for encryption (config.js) in following format. Do not checkin this file with source code eg. module.exports = { secret: 'add a secret here' }

  • npm install

  • npm run dev

  • Test in postman

Signup endpoint http://localhost:3090/signup

eg. body

{ "email": "[email protected]", "password":"test" }

Signin endpoint http://localhost:3090/signin

eg. body

{ "email": "[email protected]", "password":"test" }