--- id: fastapi-sso version: "0.21.1" license: MIT license_treatment: permissive maintenance: active --- # fastapi-sso — FastAPI plugin to enable SSO to most common providers (such as Facebook login, Google login and login via Microsoft Office 365 Account) License: permissive · Maintenance: active · Downloads: 7.0M/mo ## What it is and what it does FastAPI SSO is a FastAPI plugin that integrates OAuth-based single sign-on (SSO) authentication into your application. It abstracts away the complexity of OAuth flows and lets you add "Login with Google," "Login with Facebook," "Login with Microsoft," and many other provider buttons to your backend with minimal code. The package handles OAuth state validation, token exchange, and user identity verification. The library supports both official providers (Google, Microsoft, Facebook, Spotify, Fitbit, Github, Notion, Twitter) and community-contributed providers (Kakao, Naver, Gitlab, Line, LinkedIn, Yandex, and others). It uses httpx for HTTP requests, oauthlib for OAuth protocol handling, and pyjwt for JWT token processing. As of version 0.16.0, it requires async context managers to prevent race conditions in concurrent login scenarios, and version 0.19.0 fixed a critical CSRF vulnerability by adding proper OAuth state validation. Use it for: - Add a "Login with Google" button to a FastAPI web application without implementing OAuth from scratch. - Migrate user authentication from a custom system to federated identity using multiple social providers. - Build a multi-tenant SaaS platform where users can sign up via their existing Google or Microsoft account. - Implement passwordless authentication by delegating identity verification to trusted OAuth providers. - Support enterprise login via Microsoft Office 365 accounts in an internal FastAPI application. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. FastAPI plugin that adds single sign-on (SSO) authentication to your application using OAuth providers like Google, Facebook, Microsoft, and others. Yes. This package is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive MIT license. It solves a common authentication problem with broad provider support. The recent security fixes (state validation in 0.19.0, race condition fix in 0.16.0) show responsive maintenance. Use it if you need OAuth SSO in FastAPI and are willing to adopt the async context manager pattern. ## Install pip install fastapi-sso uv add fastapi-sso poetry add fastapi-sso ## Installing fastapi-sso Before you install: Low friction install with six stable runtime dependencies. Actively maintained with a recent release 53 days ago; repo shows 482 stars and last commit on 2026-08-10. Requires Python 3.10 or later. License in practice: MIT license (permissive) means you can use this in commercial and proprietary projects with minimal restrictions—just include the license notice. Quickstart: pip install fastapi-sso from fastapi_sso.fastapi_sso import FastAPISSOBase # Configure SSO with a provider (e.g., Google) sso = FastAPISSOBase(client_id="...", client_secret="...", redirect_url="...") # In your route handler: async with sso: user_info = await sso.verify_and_process(request) Requires async context manager (async with) as of version 0.16.0; synchronous with is deprecated. Must configure OAuth credentials for your chosen provider. Verify before relying: - Whether all listed providers (Google, Facebook, Microsoft, Spotify, Fitbit, Github, Notion, Twitter, and contributed providers) are equally well-tested and maintained. - Performance characteristics and rate-limiting behavior when handling high-concurrency login flows. - Whether the pluggable server-side state store mentioned for version 1.0.0 is already available or still planned. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 7.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags fastapi oauth login, sso authentication provider, google facebook microsoft login, fastapi oauth2 integration, social login fastapi, oauth state validation, fastapi identity provider, oauth-sso, authentication, identity-provider [View on SkillFed](https://skillfed.io/packages/fastapi-sso) · [View on PyPI](https://pypi.org/project/fastapi-sso/)