https://github.com/commitwiz/fastapi-with-jwt-token-based-authentication
Secure a FastAPI app by enabling authentication using JSON Web Tokens (JWTs)
https://github.com/commitwiz/fastapi-with-jwt-token-based-authentication
fastapi jwt-authentication
Last synced: 3 months ago
JSON representation
Secure a FastAPI app by enabling authentication using JSON Web Tokens (JWTs)
- Host: GitHub
- URL: https://github.com/commitwiz/fastapi-with-jwt-token-based-authentication
- Owner: commitwiz
- License: mit
- Created: 2025-10-02T13:01:14.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-10-02T13:03:08.000Z (3 months ago)
- Last Synced: 2025-10-02T19:27:00.532Z (3 months ago)
- Topics: fastapi, jwt-authentication
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Securing FastAPI with JWT Token-based Authentication
### Want to learn how to build this?
Check out the [post](https://testdriven.io/blog/fastapi-jwt-auth/).
## Want to use this project?
1. Fork/Clone
1. Create and activate a virtual environment:
```sh
$ python3 -m venv venv && source venv/bin/activate
```
1. Install the requirements:
```sh
(venv)$ pip install -r requirements.txt
```
1. Run the app:
```sh
(venv)$ python main.py
```
1. Test at [http://localhost:8081/docs](http://localhost:8081/docs)