docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
{
"context": "This criteria evaluates how well the engineer uses passport-google-oauth to implement OAuth 2.0 authentication with proper error handling and authentication failure management. The focus is on correctly configuring the OAuth2Strategy, implementing error handling in verify callbacks, and properly managing authentication failures.",
"type": "weighted_checklist",
"checklist": [
{
"name": "OAuth2Strategy Configuration",
"description": "Correctly imports and configures the OAuth2Strategy from passport-google-oauth with clientID, clientSecret, and callbackURL parameters",
"max_score": 15
},
{
"name": "Strategy Registration",
"description": "Properly registers the Google OAuth strategy with Passport using passport.use() method",
"max_score": 10
},
{
"name": "Verify Callback Implementation",
"description": "Implements the verify callback with correct signature (accessToken, refreshToken, profile, done) and uses the done callback appropriately",
"max_score": 15
},
{
"name": "Error Handling in Verify",
"description": "Implements error handling within the verify callback by calling done() with error parameter when authentication fails or errors occur",
"max_score": 20
},
{
"name": "Authentication Middleware Usage",
"description": "Uses passport.authenticate() middleware correctly on the /auth/google and /auth/google/callback routes with appropriate options",
"max_score": 15
},
{
"name": "Failure Redirect Configuration",
"description": "Configures failureRedirect option in passport.authenticate() to handle authentication failures by redirecting to error page",
"max_score": 15
},
{
"name": "Error Logging",
"description": "Logs authentication errors appropriately when errors occur during the OAuth process, capturing error details for debugging",
"max_score": 10
}
]
}