--- id: oic version: "1.7.0" license: Apache 2.0 license_treatment: permissive maintenance: active --- # oic — Python implementation of OAuth2 and OpenID Connect License: permissive · Maintenance: active · Downloads: 502.3K/mo ## 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 above — verify before relying. A complete Python implementation of OpenID Connect and OAuth 2.0 specifications, enabling authentication and authorization workflows in applications. 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 pip install oic uv add oic poetry add oic ## Installing oic 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. 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 Requires Python 3.8 or later; some dependencies like pycryptodomex and cryptography may require a C compiler on some platforms. 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_current - Install friction: low - Maintenance: active - Downloads: 502.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags openid connect python, oauth2 implementation, oidc client library, authentication protocol, identity provider integration, oauth2 server, openid connect server, authentication, oauth2, cryptography [View on SkillFed](https://skillfed.io/packages/oic) · [View on PyPI](https://pypi.org/project/oic/)