An authentication/authorization middleware does nothing but call next().
Why AI tools produce this: AI coding tools produce this regularly, typically when prompted for a shortcut or a quick fix.
Why this matters
A guard whose entire body is next() (or return next()) authorises every request, so any route it protects is effectively public. This is the classic "stubbed out for now" middleware that ships to production and silently removes access control.
Implement the check: verify the session/token, and either call next() on success or short-circuit with res.status(401).end() / res.status(403).end() (or next(err)) when it fails. If a route is meant to be public, remove the guard entirely rather than leaving a no-op that reads as protected.
Suppressing this rule
If a finding is a genuine false positive, scope the suppression to the exact line and leave a reason, never disable the rule project-wide. Disable directives are line-scoped by design.
// oauthlint-disable-next-line auth.express.auth-middleware-noop -- <reason>