Flask-OAuthlib
OAuthlib for Flask
What it is and what it does
Flask-OAuthlib is a Flask extension that wraps oauthlib to provide OAuth authentication and authorization capabilities. It lets you build Flask applications that act as OAuth clients (authenticating users via external OAuth providers like Google or GitHub) and as OAuth providers (issuing tokens to third-party applications). The package supports OAuth 1.0a/1.0/1.1 on the client side and both OAuth 1.0 (with HMAC and RSA signatures) and OAuth 2.0 (with Bearer tokens) on the provider side.
The extension integrates directly with Flask's request/response model and provides a friendly API similar to the older Flask-OAuth. It depends on Flask, oauthlib, requests-oauthlib, and cachelib. However, the package is dormant—its last release was 2020-09-07, and the author explicitly recommends using authlib instead for new projects. This makes it suitable mainly for maintaining existing applications rather than starting new OAuth integrations.
Use it for:
- Add OAuth 2.0 login (e.g., via Google or GitHub) to an existing Flask web application.
- Build a Flask-based OAuth provider to issue access tokens to third-party client applications.
- Migrate from Flask-OAuth to a more capable OAuth library while keeping Flask integration.
- Implement OAuth 1.0a authentication for legacy APIs that do not support OAuth 2.0.
- Cache OAuth tokens and credentials within a Flask application using the cachelib integration.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Flask-OAuthlib adds OAuth 1.0a and OAuth 2.0 client and provider support to Flask applications, enabling authentication with remote OAuth services and creation of your own OAuth providers.
No for new projects—the author recommends authlib instead. Yes-with-conditions for maintaining existing Flask-OAuthlib applications: the package is dormant (last release 2020-09-07), has no known vulnerabilities, and installs easily, but you should plan a migration path to authlib or another actively maintained OAuth library. Do not use for new OAuth integrations.
Install
flask-oauthlib on PyPI
pip
pip install flask-oauthlibuv
uv add flask-oauthlibpoetry
poetry add flask-oauthlibInstalling Flask-OAuthlib
Before you install
Low install friction with a pure-Python wheel. Maintenance is dormant—the last release was 2020-09-07, and the repository shows no recent commits despite being archived=false. The author's own description recommends authlib as an alternative.
License in practice
BSD license (permissive) imposes no significant restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install Flask-OAuthlib
from flask import Flask
from flask_oauthlib.client import OAuth
app = Flask(__name__)
oauth = OAuth(app)
Requires Flask and oauthlib as runtime dependencies; no minimum Python version is formally specified, though classifiers indicate support for Python 2.6 through 3.6.
Verify before relying
- Whether the package remains compatible with modern Python versions (3.8+) despite classifiers only listing up to 3.6.
- Current state of OAuth 2.0 provider implementation and whether it meets contemporary security standards.
- Whether dormant status means critical bugs or security issues in the OAuth flow implementation will be addressed.
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — Flask, oauthlib, requests-oauthlib, cachelib |
| Maintenance | dormant — 2,167 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 369,752/month — #7,184 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: Flask_OAuthlib-0.9.6-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
AuthlibAuthlib provides a complete implementation of…
permissive · top 1,000 on PyPI
oauth2Implements OAuth 1.0 authentication for Python…
permissive · top 15,000 on PyPI
oauthlibOAuthLib implements OAuth 1.0 and OAuth 2.0…
permissive · top 1,000 on PyPI
Flask-DanceFlask-Dance simplifies OAuth authentication in…
permissive · top 5,000 on PyPI
requests-oauthlibAdds OAuth 1 and OAuth 2 authentication support…
permissive · top 1,000 on PyPI
google-auth-oauthlibIntegrates oauthlib with google-auth to handle…
permissive · top 1,000 on PyPI
oauthenticatorOAuthenticator provides OAuth2 login handlers…
permissive · top 15,000 on PyPI
django-oauth-toolkitAdds OAuth2 authorization server capabilities…
permissive · top 5,000 on PyPI
google-auth-oauthlib-stubsProvides type stubs for google-auth-oauthlib to…
permissive · top 15,000 on PyPI
flask-oidcAdds OpenID Connect authentication support to…
permissive · top 5,000 on PyPI