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 command-line tool that validates OAuth 2.0 client configuration files and generates authorization URLs for Google API access.
Your tool should:
https://www.googleapis.com/auth/drive.readonly and https://www.googleapis.com/auth/userinfo.emailAuthorization URL: <url>
State: <state>Create a Python script oauth_validator.py that implements the above requirements. The script should accept a single command-line argument for the client secrets file path.
Provides OAuth 2.0 authorization flow support for Google APIs.
Given a valid client secrets file test_client_secrets.json:
{
"installed": {
"client_id": "test_client_id.apps.googleusercontent.com",
"client_secret": "test_secret",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"redirect_uris": ["http://localhost"]
}
}When running: python oauth_validator.py test_client_secrets.json
The output should contain:
When running: python oauth_validator.py nonexistent.json
The script should:
Using the same valid configuration from Test 1, verify that the generated authorization URL includes both requested scopes in the URL parameters.