or run

npx @tessl/cli init
Log in

Version

Files

tile.json

rubric.jsonevals/scenario-8/

{
  "context": "This evaluation assesses how well the engineer uses the passport-google-oauth package to implement Google OAuth authentication, focusing on proper strategy registration with Passport and correct application of authentication middleware to routes.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "OAuth2Strategy Import",
      "description": "Correctly imports OAuth2Strategy from the passport-google-oauth package (e.g., require('passport-google-oauth').OAuth2Strategy or require('passport-google-oauth20'))",
      "max_score": 10
    },
    {
      "name": "Strategy Configuration",
      "description": "Properly instantiates OAuth2Strategy with required configuration options: clientID, clientSecret, callbackURL, and scope array including 'profile' and 'email'",
      "max_score": 20
    },
    {
      "name": "Verify Callback",
      "description": "Implements the verify callback function with correct signature (accessToken, refreshToken, profile, done) and properly calls done() to complete authentication",
      "max_score": 15
    },
    {
      "name": "Strategy Registration",
      "description": "Correctly registers the strategy with Passport using passport.use() with the instantiated OAuth2Strategy",
      "max_score": 15
    },
    {
      "name": "Auth Initiation Route",
      "description": "Implements the /auth/google route using passport.authenticate('google') middleware with appropriate scope configuration",
      "max_score": 15
    },
    {
      "name": "Callback Route Middleware",
      "description": "Implements the /auth/google/callback route using passport.authenticate('google') middleware with failureRedirect option set to '/login'",
      "max_score": 15
    },
    {
      "name": "Success Redirect",
      "description": "Properly handles successful authentication by redirecting to /dashboard after the callback route authentication succeeds",
      "max_score": 10
    }
  ]
}