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
- Host: GitHub
- URL: https://github.com/angelfire/jwt-auth-route
- Owner: Angelfire
- Created: 2019-06-07T20:16:03.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-07T20:26:10.000Z (about 7 years ago)
- Last Synced: 2025-01-25T19:42:10.968Z (over 1 year ago)
- Language: JavaScript
- Size: 1.98 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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`