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%
Create a desktop application that performs OAuth 2.0 authentication for accessing Google APIs.
Your implementation must:
client_secrets.json in the current directoryhttps://www.googleapis.com/auth/userinfo.email and https://www.googleapis.com/auth/userinfo.profilecredentials.json in JSON format for future useauthenticate() that performs the OAuth flow and returns credentialsclient_secrets.jsoncredentials.jsonclient_secrets.json succeeds @testcredentials.json in JSON format @test@generates
def authenticate():
"""
Performs OAuth 2.0 authentication flow for a desktop application.
Loads client configuration from client_secrets.json, runs an OAuth flow
with a local server on port 8080, opens the browser for user authorization,
and saves the obtained credentials to credentials.json.
Returns:
google.oauth2.credentials.Credentials: Authenticated credentials
"""
passProvides OAuth 2.0 authentication flow support for desktop applications.