check_api_auth
Detect Next.js API routes lacking authentication checks and return unprotected file paths with fix snippets for Supabase Auth, NextAuth, or Passport.
Instructions
Check API route authentication in a Next.js project. Detects API routes (App Router route.ts, Pages Router pages/api/) without authentication middleware or session checks. Supports Next.js, Supabase Auth, NextAuth, and Passport patterns. Returns unprotected routes with file paths and fix code snippets.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_path": "<project_path>"
},
"name": "check_api_auth"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | Absolute path to the project directory to audit. Must be a directory you own or manage. |