Socket
Socket
Sign inDemoInstall

fastapi-oauth2

Package Overview
Dependencies
6
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    fastapi-oauth2

Easy to integrate OAuth2 authentication with support for several identity providers.


Maintainers
1

Readme

fastapi-oauth2

PyPI 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

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc