CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-google-auth-oauthlib

Google Authentication Library - oauthlib integration for OAuth 2.0 flows.

83

1.05x
Overview
Eval results
Files

rubric.jsonevals/scenario-3/

{
  "context": "This criteria evaluates how effectively the engineer uses the google-auth-oauthlib package to implement an OAuth 2.0 authorization flow. The focus is on proper usage of the Flow class, configuration loading methods, authorization URL generation, and handling of OAuth flow parameters.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Flow Creation",
      "description": "Uses Flow.from_client_secrets_file() to create a Flow instance from the JSON client secrets file rather than manually parsing the file or using lower-level OAuth libraries",
      "max_score": 30
    },
    {
      "name": "Scope Configuration",
      "description": "Passes the required scopes (https://www.googleapis.com/auth/drive.readonly and https://www.googleapis.com/auth/userinfo.email) when creating the Flow, either as a parameter to from_client_secrets_file() or by setting flow.scopes",
      "max_score": 15
    },
    {
      "name": "Authorization URL Generation",
      "description": "Uses flow.authorization_url() method to generate the authorization URL rather than manually constructing the URL or using lower-level OAuth mechanisms",
      "max_score": 25
    },
    {
      "name": "Offline Access",
      "description": "Configures the authorization URL to request offline access by passing access_type='offline' to flow.authorization_url() or ensuring offline access is included in the request",
      "max_score": 15
    },
    {
      "name": "State Parameter Handling",
      "description": "Correctly captures and outputs the state parameter returned from flow.authorization_url(), which returns a tuple of (authorization_url, state)",
      "max_score": 10
    },
    {
      "name": "Error Handling",
      "description": "Handles errors appropriately when the client secrets file is missing or invalid, using try-except blocks to catch exceptions that may be raised by Flow.from_client_secrets_file()",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/pypi-google-auth-oauthlib

tile.json