Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/mgorsk1/fastapi_oauth2

A minimal example of adding oauth2 proxy authentication to your FastAPI microservice.
https://github.com/mgorsk1/fastapi_oauth2

Last synced: 30 days ago
JSON representation

A minimal example of adding oauth2 proxy authentication to your FastAPI microservice.

Awesome Lists containing this project

README

        

# Fast API with Oauth2 Proxy

This is a minimal example of adding OAuth2 Proxy Authentication (Keycloak provider) to your FastAPI microservice.

This approach 'hides' original FastAPI backend behind OAuth2 proxy, which handles communication with Keycloak and passes
access token to your API after successful login.

## Prerequisites

Add to your `/etc/hosts`:

```text
127.0.0.1 keycloak
127.0.0.1 oidc
```