Backend Integration

Python and OpenID Connect

A pure-Python OpenID Connect client supporting OAuth 2.1 authorization flows, built for Python 3.10+ with minimal dependencies.

OAuth 2.1 authorization flows include:

  • the authorization code flow, for interactive user login;
  • the client credentials flow, for confidential machine-to-machine communication.

This OIDC Client supports reading configuration profiles from a pyproject.toml file.


Python 3.10+


pip install oidc-client


To enable interactive login for your project, add the following to your pyproject.toml:

issuer = "https://'your_organization_name'"  # URL of your OIDC provider
client_id = "Your_application_client_id"
  • On settings add support of [PKCE].


To log-in as a user, using a web browser:

oidc login --interactive

2024 ©