Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matthewoestreich/node-api-jwt
Nodejs API with JWT proof of concept
https://github.com/matthewoestreich/node-api-jwt
bcrypt express json-web-token jsonwebtoken jsonwebtokens jwt jwt-auth mongodb node-api node-jwt node-jwt-integration nodejs
Last synced: 17 days ago
JSON representation
Nodejs API with JWT proof of concept
- Host: GitHub
- URL: https://github.com/matthewoestreich/node-api-jwt
- Owner: matthewoestreich
- Created: 2022-01-10T00:12:06.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-01-25T00:01:14.000Z (almost 3 years ago)
- Last Synced: 2024-11-21T06:18:59.072Z (about 2 months ago)
- Topics: bcrypt, express, json-web-token, jsonwebtoken, jsonwebtokens, jwt, jwt-auth, mongodb, node-api, node-jwt, node-jwt-integration, nodejs
- Language: JavaScript
- Homepage:
- Size: 11.1 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node API with JWT : Proof of Concept
## Demo
https://user-images.githubusercontent.com/21092343/150077834-ac8d28a9-e1d1-40d0-9962-64426524112f.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](https://marketplace.visualstudio.com/items?itemName=humao.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](https://mattoestreich.com)
---