google-auth-oauthlib
Google Authentication Library
Decision gist · record as of 2026-08-14
Yes. This is a stable, actively maintained library in the top 1000 PyPI packages with no known vulnerabilities. It has low install friction, permissive licensing, and solves a common problem—OAuth 2.0 authentication for Google services—that would otherwise require significant manual implementation. Install it if you need to authenticate users or applications against Google APIs.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >= 3.10.
- You must have a Google OAuth 2.0 credentials file (client secrets JSON) to initialize an authentication flow.
- Low install friction with a pure-wheel distribution.
License · maintenance · safety
Apache 2.0 (permissive) — Apache 2.0 is permissive and imposes minimal restrictions; you can use this library in commercial and proprietary projects without reciprocal licensing obligations.
last release 2026-05-07 (99 days) · last repo commit 2026-08-14 · 5,371 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 175,046,031 downloads/mo, #240 on PyPI
Alternatives
Verify before relying
pip install google-auth-oauthlib
from google_auth_oauthlib.flow import InstalledAppFlow
flow = InstalledAppFlow.from_client_secrets_file(
'credentials.json',
scopes=['https://www.googleapis.com/auth/drive']
)- Specific OAuth 2.0 flows supported (authorization code, service account, etc.) beyond the basic InstalledAppFlow pattern.
- Whether the library handles token refresh and expiration automatically or requires manual management.
- Integration patterns with specific Google APIs beyond generic scopes.
What it is and what it does
google-auth-oauthlib bridges oauthlib and google-auth to simplify OAuth 2.0 authentication for Google services. It provides a higher-level interface for handling the authorization flow—obtaining user consent, exchanging authorization codes for tokens, and managing credentials—without requiring you to implement the OAuth protocol details yourself. The library depends on google-auth for credential management and requests-oauthlib for the underlying OAuth mechanics.
This package is typically used when building applications that need to authenticate users against Google APIs (Drive, Gmail, Sheets, etc.) or when you need to handle delegated access on behalf of users. It abstracts away much of the boilerplate around token exchange and credential lifecycle, making it straightforward to add Google sign-in or API access to Python applications.
Use it for
- Build a web or desktop app that lets users sign in with their Google account and grant access to their Google Drive or Gmail.
- Implement server-side OAuth 2.0 flows to obtain long-lived credentials for accessing Google APIs on behalf of authenticated users.
- Integrate Google authentication into a Python CLI tool or automation script that needs user-delegated API access.
- Handle the complete authorization code flow (user consent, token exchange, refresh) without manually implementing OAuth protocol steps.
- Manage and refresh OAuth 2.0 credentials for applications that interact with multiple Google services.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
This is a stable, actively maintained library in the top 1000 PyPI packages with no known vulnerabilities. It has low install friction, permissive licensing, and solves a common problem—OAuth 2.0 authentication for Google services—that would otherwise require significant manual implementation. Install it if you need to authenticate users or applications against Google APIs.
Install
google-auth-oauthlib on PyPI
Before you install
Low install friction with a pure-wheel distribution. Active maintenance with a recent release (99 days ago) and ongoing repository activity. Requires Python 3.10 or later.
Requires Python >= 3.10. You must have a Google OAuth 2.0 credentials file (client secrets JSON) to initialize an authentication flow.
License in practice
Apache 2.0 is permissive and imposes minimal restrictions; you can use this library in commercial and proprietary projects without reciprocal licensing obligations.
Quickstart
pip install google-auth-oauthlib
from google_auth_oauthlib.flow import InstalledAppFlow
flow = InstalledAppFlow.from_client_secrets_file(
'credentials.json',
scopes=['https://www.googleapis.com/auth/drive']
)
Verify before relying
- Specific OAuth 2.0 flows supported (authorization code, service account, etc.) beyond the basic InstalledAppFlow pattern.
- Whether the library handles token refresh and expiration automatically or requires manual management.
- Integration patterns with specific Google APIs beyond generic scopes.
Package facts
| License | Apache 2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesgoogle-authrequests-oauthlib |
| Maintenance | Actively maintained 99 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 175,046,031 / month, #240 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Internet :: WWW/HTTP |
Evidence: google_auth_oauthlib-1.4.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 › “google oauth authentication”
- google-auth-oauthlibIntegrates oauthlib with google-auth to handle OAuth 2.0…
- gpsoauthImplements Google Play Services OAuth authentication for Python,…
- google-authHandles server-to-server authentication with Google APIs using OAuth…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also google-auth · google-auth-httplib2 · google-oauth2-tool · google-reauth · googleauthentication · gpsoauth · oauth2client · google-oauth · google-auth-oauthlib-stubs · pydata-google-auth