oic
Python implementation of OAuth2 and OpenID Connect
Decision gist · record as of 2026-08-14
Yes, with conditions. The package is actively maintained, has no known vulnerabilities, and implements a mature standard. However, the description acknowledges that documentation and examples are largely unmaintained and contain issues. Install if you need a full OpenID Connect/OAuth 2.0 implementation and can tolerate working from the code and community resources rather than polished docs; avoid if you need comprehensive, current examples or tutorials to get started quickly.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later; some dependencies like pycryptodomex and cryptography may require a C compiler on some platforms.
- Low install friction with a pure-Python wheel distribution.
- Active maintenance with recent commits (last commit 2026-07-27) and a reasonable dependency footprint of 8 runtime packages.
License · maintenance · safety
Apache 2.0 (permissive) — Licensed under Apache 2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions—you must include a copy of the license and state significant changes.
last release 2024-04-25 (841 days) · last repo commit 2026-07-27 · 747 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 502,297 downloads/mo, #6,309 on PyPI
Alternatives
Verify before relying
pip install oic
from oic.oic import Client
from oic.utils.authn.client import ClientSecretBasic
client = Client(client_authn_method={'client_secret_basic': ClientSecretBasic()})
client.store_registration_info(registration_response)
# Use client to initiate authentication flow- Whether the documentation issues flagged in the description materially affect typical use cases
- Current state of the example implementations and whether they are functional enough to learn from
What it is and what it does
oic is a Python library that implements the OpenID Connect Core specification and, as a side effect, OAuth 2.0. It provides the cryptographic and protocol machinery needed to build authentication and authorization flows—whether you're building a client that needs to authenticate users via an external identity provider, or a server that needs to issue identity tokens and handle authorization requests.
The package depends on cryptographic libraries (pycryptodomex, cryptography, pyjwkest), XML handling (defusedxml), HTTP communication (requests), and templating (mako), plus modern Python tooling (pydantic-settings, typing-extensions). It targets Python 3.8 through 3.11 and has been actively maintained since its initial release in 2014, though the description notes that documentation and examples have drifted and are being brought back into shape.
Use it for
- Building a web application that authenticates users through an external OpenID Connect provider (e.g., corporate SSO, social login).
- Implementing an OAuth 2.0 or OpenID Connect server to issue tokens and manage user identity for your own applications.
- Integrating identity federation into a microservice or API gateway that needs to validate and exchange tokens.
- Handling JWT validation and cryptographic verification of identity tokens from third-party providers.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
The package is actively maintained, has no known vulnerabilities, and implements a mature standard. However, the description acknowledges that documentation and examples are largely unmaintained and contain issues. Install if you need a full OpenID Connect/OAuth 2.0 implementation and can tolerate working from the code and community resources rather than polished docs; avoid if you need comprehensive, current examples or tutorials to get started quickly.
Install
oic on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with recent commits (last commit 2026-07-27) and a reasonable dependency footprint of 8 runtime packages. Development status marked Beta, and the maintainers explicitly seek additional contributors.
Requires Python 3.8 or later; some dependencies like pycryptodomex and cryptography may require a C compiler on some platforms.
License in practice
Licensed under Apache 2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions—you must include a copy of the license and state significant changes.
Quickstart
pip install oic
from oic.oic import Client
from oic.utils.authn.client import ClientSecretBasic
client = Client(client_authn_method={'client_secret_basic': ClientSecretBasic()})
client.store_registration_info(registration_response)
# Use client to initiate authentication flow
Verify before relying
- Whether the documentation issues flagged in the description materially affect typical use cases
- Current state of the example implementations and whether they are functional enough to learn from
Package facts
| License | Apache 2.0 permissive |
| Python support | Supports the current Python release ~=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 8 packagesrequestspycryptodomexpydantic-settingspyjwkestmakocryptographydefusedxmltyping-extensions |
| Maintenance | Actively maintained 841 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 502,297 / month, #6,309 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules |
Evidence: oic-1.7.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “openid connect python”
- oicA complete Python implementation of OpenID Connect and OAuth 2.0…
- flask-oidcAdds OpenID Connect authentication support to Flask applications,…
- pyopImplements an OpenID Connect Provider (OP) library that handles…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also pyop · django-oidc-provider · flask-oidc · Authlib · python-openid · intuit-oauth · mozilla-django-oidc · oidc-provider-mock · msal · django-oauth-toolkit