better-auth is configured to issue insecure session cookies.
Why AI tools produce this: AI coding tools produce this regularly, typically when prompted for a shortcut or a quick fix.
Why this matters
Under advanced, useSecureCookies: false forces the session cookie to be sent without the Secure flag (so it travels over plain HTTP and can be sniffed), and secure: false / httpOnly: false in defaultCookieAttributes (or a per-cookie attributes block) strips the protections that keep the cookie off HTTP and out of document.cookie.
Leave better-auth's secure defaults in place, or set useSecureCookies: true and keep secure/httpOnly at true. If you need insecure cookies for local HTTP dev, 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.betterauth.insecure-cookie -- <reason>