MEDIUM AI PREVALENCE: MEDIUM auth.passport.jwt-ignore-expiration
A passport-jwt strategy is configured with ignoreExpiration: true.
Why AI tools produce this: AI coding tools produce this regularly, typically when prompted for a shortcut or a quick fix.
Why this matters
This disables the exp claim check, so the strategy authenticates expired tokens forever. A leaked or long-old JWT then never stops working, defeating short-lived access tokens. Remove ignoreExpiration: true (the default is false, which enforces exp) and issue tokens with a short lifetime. See CWE-613 (Insufficient Session Expiration).
VULNERABLE
SAFE
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.passport.jwt-ignore-expiration -- <reason>