Skip to main content

fastapi-oauth2

PyPI Playground Python FastAPI Tests Docs

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

Metadata

Release files for fastapi-oauth2 1.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastapi-oauth2 1.5.0
File Size Uploaded
fastapi_oauth2-1.5.0.tar.gz 14.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fastapi-oauth2 1.5.0
File Interpreter ABI Platform
fastapi_oauth2-1.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.8 kB

Release files / fastapi_oauth2-1.5.0.tar.gz

Download URL fastapi_oauth2-1.5.0.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
071951311a8b1c4eb4dbb7ed7bcbd04fa6219a55fe474b0409b5c82369a0c577
BLAKE2b-256 checksum
How to use checksums
7ce99fee229c939c1ab9de17846d4f0584fe6e1874e2ec36a16baf0c88432c58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / fastapi_oauth2-1.5.0-py3-none-any.whl

Download URL fastapi_oauth2-1.5.0-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8213f7d9ebf5f141bcebb4d989aba10358be401e59b94355ba76d7e88c4d15ac
BLAKE2b-256 checksum
How to use checksums
3ddcebfa296214786256665da02b1c2756fe3fc10fa05b8d03794080f17eda03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page