flask-oidc
OpenID Connect extension for Flask
What it is and what it does
flask-oidc is a Flask extension that integrates OpenID Connect authentication into your web application. It handles the OIDC protocol flow—redirecting users to an identity provider, validating tokens, and managing sessions—so you don't have to implement those details yourself. The library is designed to work with any standards-compliant OpenID Connect provider, making it a general-purpose authentication layer rather than one tied to a specific service.
The package depends on authlib, flask, requests, and blinker. It supports Python 3.8 through 3.13 and has been actively maintained with 100% test coverage, indicating a stable, well-tested codebase suitable for production use.
Use it for:
- Add single sign-on (SSO) to a Flask app using an existing corporate or institutional OpenID Connect provider.
- Integrate user authentication without building your own login form or token validation logic.
- Delegate identity management to a standards-compliant OIDC provider.
- Protect Flask routes by requiring users to authenticate through an external identity provider.
- Build multi-tenant or federated authentication systems that rely on OIDC standards.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds OpenID Connect authentication support to Flask applications, enabling secure user login through standards-compliant OpenID Connect providers.
Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive license. It is well-tested with 100% coverage and supports current Python versions. Install it if you need OIDC authentication in Flask and are using a standards-compliant provider.
Install
flask-oidc on PyPI
pip
pip install flask-oidcuv
uv add flask-oidcpoetry
poetry add flask-oidcInstalling flask-oidc
Before you install
Low install friction with a pure-Python wheel. Actively maintained with last commit on 2026-07-28 and 100% test coverage. Four runtime dependencies (authlib, blinker, flask, requests) are all well-established.
License in practice
BSD-2-Clause is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you include the license text.
Quickstart
pip install flask-oidc
from flask import Flask
from flask_oidc import OpenIDConnect
app = Flask(__name__)
oidc = OpenIDConnect(app)
Verify before relying
- Whether the package works with all standards-compliant OIDC providers beyond the documented Ipsilon test case.
- Scope and frequency of active development beyond the most recent commit.
Package facts
| License | BSD-2-Clause (permissive) |
| Python support | supports the current Python release (<4.0,>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — authlib, blinker, flask, requests |
| Maintenance | actively maintained — 424 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 868,192/month — #4,853 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: flask_oidc-2.4.0-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
dash-authAdds HTTP Basic Authentication and OpenID…
permissive · top 15,000 on PyPI
django-oidc-providerProvides OpenID Connect and OAuth 2.0 server…
permissive · top 15,000 on PyPI
Flask-DanceFlask-Dance simplifies OAuth authentication in…
permissive · top 5,000 on PyPI
Flask-OpenIDAdds OpenID authentication support to Flask web…
permissive · top 5,000 on PyPI
PyLTI1p3Implements the LTI 1.3 Advantage specification…
permissive · top 15,000 on PyPI
oidc-provider-mockA mock OpenID Connect provider server that runs…
permissive · top 15,000 on PyPI
pyopImplements an OpenID Connect Provider (OP)…
permissive · top 15,000 on PyPI
mozilla-django-oidcIntegrates Django applications with OpenID…
copyleft · top 5,000 on PyPI
python-openidImplements OpenID authentication for Python…
permissive · top 15,000 on PyPI
oicA complete Python implementation of OpenID…
permissive · top 15,000 on PyPI