or run

npx @tessl/cli init
Log in

Version

Files

tile.json

rubric.jsonevals/scenario-2/

{
  "context": "This evaluation assesses how effectively the engineer uses passport-google-oauth to implement Google OAuth 2.0 authentication with custom scope configuration. The focus is on proper use of the OAuth2Strategy class, correct scope configuration for Google APIs, and integration with Passport.js authentication middleware.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "OAuth2Strategy Import",
      "description": "Correctly imports OAuth2Strategy from passport-google-oauth or passport-google-oauth20 package",
      "max_score": 10
    },
    {
      "name": "Strategy Configuration",
      "description": "Properly instantiates OAuth2Strategy with required configuration parameters: clientID, clientSecret, and callbackURL",
      "max_score": 15
    },
    {
      "name": "Custom Scope Array",
      "description": "Configures the scope parameter as an array that includes Google Calendar and Drive API scopes (e.g., 'https://www.googleapis.com/auth/calendar', 'https://www.googleapis.com/auth/drive.readonly' or equivalent scope URIs)",
      "max_score": 25
    },
    {
      "name": "Profile Scope Inclusion",
      "description": "Includes basic profile scopes (such as 'profile' and/or 'email') in the scope array to access user profile information",
      "max_score": 10
    },
    {
      "name": "Verify Callback Implementation",
      "description": "Implements the verify callback function with the correct signature (accessToken, refreshToken, profile, done) to handle authentication results",
      "max_score": 15
    },
    {
      "name": "Passport Strategy Registration",
      "description": "Registers the configured strategy with Passport using passport.use()",
      "max_score": 10
    },
    {
      "name": "Authentication Route",
      "description": "Uses passport.authenticate() middleware on the /auth/google route to initiate the OAuth flow",
      "max_score": 5
    },
    {
      "name": "Callback Route Handler",
      "description": "Uses passport.authenticate() middleware on the /auth/google/callback route with appropriate success and failure redirect options",
      "max_score": 10
    }
  ]
}