or run

npx @tessl/cli init
Log in

Version

Files

tile.json

rubric.jsonevals/scenario-3/

{
  "context": "This criteria evaluates how well the engineer uses passport-google-oauth to implement OAuth 2.0 authentication and efficiently extract profile data. The focus is on proper usage of the OAuth2Strategy constructor, understanding the profile object structure, and handling optional profile fields appropriately.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "OAuth2Strategy Usage",
      "description": "Uses the OAuth2Strategy class from passport-google-oauth to configure Google OAuth 2.0 authentication with clientID, clientSecret, and callbackURL parameters.",
      "max_score": 25
    },
    {
      "name": "Verify Callback Implementation",
      "description": "Implements the verify callback function with the correct signature (accessToken, refreshToken, profile, done) and uses the profile parameter to access user data.",
      "max_score": 20
    },
    {
      "name": "Profile ID Extraction",
      "description": "Correctly extracts the user ID from the profile object using profile.id or profile._json.sub.",
      "max_score": 15
    },
    {
      "name": "Profile Name Extraction",
      "description": "Correctly extracts the display name from the profile object using profile.displayName or profile._json.name.",
      "max_score": 15
    },
    {
      "name": "Email Extraction",
      "description": "Correctly extracts the primary email address from the profile.emails array (e.g., profile.emails[0].value) or from profile._json.email.",
      "max_score": 15
    },
    {
      "name": "Optional Field Handling",
      "description": "Implements proper handling for missing or undefined profile fields (displayName and email) to avoid errors, such as using optional chaining, conditional checks, or providing default values.",
      "max_score": 10
    }
  ]
}