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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastapi_oauth2-1.5.0.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastapi_oauth2-1.5.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_oauth2-1.5.0.tar.gz.

File metadata

  • Download URL: fastapi_oauth2-1.5.0.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for fastapi_oauth2-1.5.0.tar.gz
Algorithm Hash digest
SHA256 071951311a8b1c4eb4dbb7ed7bcbd04fa6219a55fe474b0409b5c82369a0c577
MD5 26c4bb480badc7472caa9f5ac5d656dc
BLAKE2b-256 7ce99fee229c939c1ab9de17846d4f0584fe6e1874e2ec36a16baf0c88432c58

See more details on using hashes here.

File details

Details for the file fastapi_oauth2-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: fastapi_oauth2-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for fastapi_oauth2-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8213f7d9ebf5f141bcebb4d989aba10358be401e59b94355ba76d7e88c4d15ac
MD5 fb516b4aa99b851b972167bd1a990f51
BLAKE2b-256 3ddcebfa296214786256665da02b1c2756fe3fc10fa05b8d03794080f17eda03

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.5.0 This release

2 files

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page