Google Authentication Library - oauthlib integration for OAuth 2.0 flows.
83
Build a simple token manager that handles OAuth 2.0 authorization flows for Google APIs.
Your implementation should:
The manager should work with the installed application flow pattern.
The implementation must pass the following test cases:
@generates
def create_flow(client_config: dict, scopes: list[str], redirect_uri: str = "urn:ietf:wg:oauth:2.0:oob"):
"""
Create an OAuth 2.0 flow from client configuration.
Args:
client_config: Dictionary with OAuth client settings
scopes: List of OAuth 2.0 scopes to request
redirect_uri: The redirect URI for the flow
Returns:
An OAuth flow object
"""
pass
def get_authorization_url(flow):
"""
Generate an authorization URL from a flow.
Args:
flow: An OAuth flow object
Returns:
Tuple of (authorization_url, state)
"""
pass
def exchange_code_for_token(flow, authorization_response: str):
"""
Exchange authorization code for access tokens.
Args:
flow: An OAuth flow object
authorization_response: The authorization response URL
Returns:
Google credentials object with access token
"""
passProvides OAuth 2.0 integration with Google's authentication library.
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