Google Authentication Library - oauthlib integration for OAuth 2.0 flows.
83
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.
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