skillfed

flask-oidc

OpenID Connect extension for Flask

flask-oidc v2.4.0 868.2K downloads/30d#4,853 on PyPI40
Permissive license BSD-2-Clause Active released

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-oidc

uv

uv add flask-oidc

poetry

poetry add flask-oidc

Installing 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

Environment :: Web EnvironmentFramework :: FlaskIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Software Development :: Libraries :: Python Modules

Tags

openid connect flaskoidc authentication flaskflask single sign-onflask oauth identityopenid provider integrationflask user authenticationoidc flask extension
authenticationopenid-connectsingle-sign-on

More Python Modules packages