Easy to integrate OAuth2 authentication with support for several identity providers.
Project description
fastapi-oauth2 
FastAPI OAuth2 is a middleware-based social authentication mechanism supporting several OAuth2 providers. It leverages the social-core authentication backends and integrates seamlessly with FastAPI applications.
Integration
For integrating the package into an existing FastAPI application, the router with OAuth2 routes and
the OAuth2Middleware with particular configs
should be added to the application.
from fastapi import FastAPI
from fastapi_oauth2.middleware import OAuth2Middleware
from fastapi_oauth2.router import router as oauth2_router
app = FastAPI()
app.include_router(oauth2_router)
app.add_middleware(OAuth2Middleware, config=OAuth2Config(...))
Contribute
Any contribution is welcome. Always feel free to open an issue or a discussion if you have any questions not covered by the documentation. If you have any ideas or suggestions, please, open a pull request. Your name will shine in our contributors' list. Be proud of what you build!
License
Copyright (C) 2023 Artyom Vancyan. MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastapi-oauth2-1.0.0.tar.gz.
File metadata
- Download URL: fastapi-oauth2-1.0.0.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7bea74843fd096ddaaf93978cf61940efc6e7df719888d1168f2bb56da58910
|
|
| MD5 |
1a89c639fc618210bb88988cf54268f3
|
|
| BLAKE2b-256 |
8bc245029483ad897f3ba856e63c1dcf6d6858fb673fc9f80c3f42f9e2e4b695
|
File details
Details for the file fastapi_oauth2-1.0.0-py3-none-any.whl.
File metadata
- Download URL: fastapi_oauth2-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e18fb5819f47a07b25e9b0bee253bb412247c12a4a067dc8d655fbd2ba563567
|
|
| MD5 |
aeb52d5f589dc39129762251ac40b92c
|
|
| BLAKE2b-256 |
b3a7057af50cd9fb5fe57f69d0c21517cc1cdfa5da1ffd5cdfb5b903979be645
|