An open API service indexing awesome lists of open source software.

https://github.com/angelfire/jwt-auth-route

Authorization route using JWT
https://github.com/angelfire/jwt-auth-route

Last synced: 2 months ago
JSON representation

Authorization route using JWT

Awesome Lists containing this project

README

          

# Protecting routes using JWT

## Install dependencies
`npm i`

## Run the server
`npm start`

## Routes
### Login
Access to this router in order to create a new JWT

`http://localhost:5000/api/login`

### Posts (Protected route)
Add `Authorization` header with the previous JWT in order the `POST` a new post.

`http://localhost:5000/api/posts`