or run

npx @tessl/cli init
Log in

Version

Files

tile.json

rubric.jsonevals/scenario-6/

{
  "context": "This evaluation assesses how well the engineer uses passport-google-oauth to implement Google OAuth 2.0 authentication and retrieve user profile data. The focus is on proper configuration of the OAuth 2.0 strategy, correct usage of Passport middleware, and effective extraction and handling of profile information returned by Google.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "OAuth2Strategy import",
      "description": "Correctly imports OAuth2Strategy (or Strategy) from passport-google-oauth or passport-google-oauth20",
      "max_score": 10
    },
    {
      "name": "Strategy configuration",
      "description": "Properly configures OAuth2Strategy with clientID, clientSecret, and callbackURL parameters from environment variables",
      "max_score": 15
    },
    {
      "name": "OAuth scope configuration",
      "description": "Configures appropriate OAuth scopes (e.g., 'profile', 'email') to access user profile data",
      "max_score": 10
    },
    {
      "name": "Verify callback implementation",
      "description": "Implements verify callback with correct signature (accessToken, refreshToken, profile, done) and properly handles the profile parameter",
      "max_score": 15
    },
    {
      "name": "Profile data extraction",
      "description": "Correctly extracts profile.id, profile.displayName, and profile.emails (or profile.email) from the Google profile object",
      "max_score": 20
    },
    {
      "name": "Strategy registration",
      "description": "Registers the configured strategy with Passport using passport.use()",
      "max_score": 10
    },
    {
      "name": "Authentication middleware",
      "description": "Uses passport.authenticate() with 'google-oauth20' or 'google' strategy name on /auth/google route with appropriate scope option",
      "max_score": 10
    },
    {
      "name": "Callback route authentication",
      "description": "Uses passport.authenticate() on the callback route (/auth/google/callback) with appropriate success and failure redirects",
      "max_score": 10
    }
  ]
}