MEDIUM AI PREVALENCE: HIGH auth.jwt.no-expiration
JWT is signed without any expiresIn / exp claim, OR a token is verified without an maxAge 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
A stolen token therefore remains valid forever.
Always set a reasonable expiration on access tokens (5-60 minutes is typical) and verify it with { maxAge: '15m' } or by validating the exp claim explicitly.
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.no-expiration -- <reason>