A NextAuth/Auth.js custom cookie is configured as insecure.
Why AI tools produce this: AI coding tools produce this regularly, typically when prompted for a shortcut or a quick fix.
Why this matters
Setting secure: false lets the browser send the session-token cookie over plain HTTP, and httpOnly: false exposes it to document.cookie so any XSS can read it.
Set secure: true and httpOnly: true on the cookie options (Auth.js already applies these defaults, so the safest fix is to delete the overrides). If you need insecure cookies for local HTTP development, gate the value on process.env.NODE_ENV !== 'production' rather than hard-coding false.
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.nextauth.cookie-insecure -- <reason>