MEDIUM AI PREVALENCE: HIGH auth.jwt.ignore-expiration
ignoreExpiration: true in a jsonwebtoken verify() call disables the exp claim check.
Why AI tools produce this: AI coding tools generate this anti-pattern by default, it appears in a large share of AI-written auth code.
Why this matters
An expired token is then accepted as valid forever, so a stolen or long-old token never stops working, defeating the whole point of short-lived access tokens.
Remove ignoreExpiration: true so the exp claim is enforced, and set a sane expiresIn when signing (jwt.sign(payload, key, { expiresIn: '15m' })). 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.jwt.ignore-expiration -- <reason>