--- id: oauth2-client version: "1.4.2" license: unclear license_treatment: unclear maintenance: aging --- # oauth2-client — A client library for OAuth2 License: unclear · Maintenance: aging · Downloads: 203.8K/mo ## What it is and what it does OAuth2Client is a Python library that abstracts the OAuth2 authentication process, handling three common token flows: authorization code (with optional PKCE support), user credentials, and client credentials. It manages token lifecycle including refresh and expiration detection, and provides a CredentialManager class that can be extended to handle server-specific token response fields like OpenID's id_token. The library starts a local HTTP server to receive authorization callbacks in the authorization code flow, and supports proxy configuration for all flows. It is built on top of the requests library but has no other runtime dependencies, making it lightweight to install. However, the package has not been actively developed since April 2023, and token expiration detection may not be accurate for all OAuth2 server implementations without subclassing and customization. Use it for: - Implement authorization code flow with PKCE for desktop or mobile applications redirecting to a local callback handler - Obtain and refresh access tokens using user credentials for server-to-user OAuth2 integrations - Manage client credentials grants for service-to-service authentication without user interaction - Extend CredentialManager to parse and store additional token response fields like OpenID Connect id_token - Integrate OAuth2 authentication into applications that need to work behind HTTP proxies ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Handles OAuth2 authentication flows (authorization code, user credentials, client credentials) and token management for Python applications integrating with OAuth2 servers. Yes, with conditions. The package is stable and has no known vulnerabilities, making it suitable for straightforward OAuth2 flows in applications that can tolerate aging maintenance. However, verify the license before use, test token expiration handling against your OAuth2 server, and be prepared to maintain or fork the code if the upstream project does not resume active development. Not recommended for new projects requiring ongoing security updates or support. ## Install pip install oauth2-client uv add oauth2-client poetry add oauth2-client ## Installing oauth2-client Before you install: Low install friction with no runtime dependencies. Maintenance status is aging—last release was in April 2023 and the repository has not been updated since January 2026, though it remains unarchived and has received a recent commit. License in practice: License treatment is unclear; no SPDX identifier or raw license text is available in the metadata. Verify the actual license before use in proprietary or restricted contexts. Quickstart: pip install oauth2-client from oauth2_client.credentials_manager import CredentialManager, ServiceInformation service_info = ServiceInformation( 'https://authorization-server/oauth/authorize', 'https://token-server/oauth/token', 'client_id', 'client_secret', ['scope_1']) manager = CredentialManager(service_info) manager.init_with_user_credentials('login', 'password') Verify before relying: - Whether the package is actively maintained or will receive security updates going forward - What license applies to the package (SPDX and raw license fields are both null) - Whether token expiration handling is accurate for your specific OAuth2 server implementation ## Package facts - License: not declared (unclear) - Python support: unspecified - Install friction: low - Maintenance: aging - Downloads: 203.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags oauth2 authentication client, oauth2 token management, authorization code flow, oauth2 credential manager, client credentials grant, oauth2 refresh token, user credentials oauth2, oauth2, authentication, token-management [View on SkillFed](https://skillfed.io/packages/oauth2-client) · [View on PyPI](https://pypi.org/project/oauth2-client/)