Google Authentication Library - oauthlib integration for OAuth 2.0 flows.
83
Build a credential manager for interactive Python environments that helps users authenticate with Google APIs.
Create a Python module that provides a simple function to obtain Google OAuth credentials interactively. The function should:
The solution should be straightforward for interactive environments like Jupyter notebooks or IPython shells.
@generates
def get_credentials(client_id: str, client_secret: str, scopes: list[str]):
"""
Obtain Google OAuth credentials interactively.
This function simplifies the OAuth flow for interactive environments by:
- Automatically finding an available local port for the redirect server
- Opening the user's browser for authentication
- Handling the OAuth callback
- Returning ready-to-use credentials
Args:
client_id: The OAuth 2.0 client ID
client_secret: The OAuth 2.0 client secret
scopes: List of OAuth 2.0 scopes to request
Returns:
Credentials object ready for use with Google API client libraries
"""
passProvides OAuth 2.0 integration for Google authentication flows, including interactive authentication utilities.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/pypi-google-auth-oauthlibevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10