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

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)

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)