Skip to content

Latest commit

 

History

History
41 lines (23 loc) · 1022 Bytes

README.md

File metadata and controls

41 lines (23 loc) · 1022 Bytes

Node API with JWT : Proof of Concept

Demo

node-jwt-poc-demo.mp4

Synopsis

This project uses MongoDB to store User accounts. Users can register accounts to access protected routes via JWT. We use bcrypt to salt and hash passwords before storing in Mongo.

Important

Authorization header value must start with JWT plus one space, and then the JWT eg:

// header shown as JSON
{
  "authorization": "JWT yourjwt.tokengoes.here"
}

Setup

  • The easiest way to test this project is to install the REST Client vscode extension.
    • Once installed, open the api.rest file at the root of this project
  • You will need to create a .env file based upon the .env.example file

Commands

  • npm install : installs dependencies
  • npm start : starts the project via nodemon

mattoestreich.com