An auth-looking cookie is being set with a maxAge greater than 30 days.
Why AI tools produce this: AI coding tools produce this regularly, typically when prompted for a shortcut or a quick fix.
Why this matters
The threshold is 30 × 24 × 60 × 60 × 1000 = 2_592_000_000 milliseconds. Long-lived session cookies expand the blast radius of any single token theft and bypass server-side revocation if the application doesn't validate freshness on every request.
Prefer short-lived access cookies (15-60 min) paired with a separate refresh token rotation flow. If you really need a "remember me" cookie, scope it tightly (SameSite=Strict, dedicated path) and back it with a server-side allowlist you can revoke.
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.cookie.long-lived -- <reason>