tessl install tessl/pypi-google-auth-oauthlib@1.2.0Google Authentication Library - oauthlib integration for OAuth 2.0 flows.
Agent Success
Agent success rate when using this tile
83%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.05x
Baseline
Agent success rate without this tile
79%
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.