MEDIUM AI PREVALENCE: HIGH auth.py.jwt.no-expiration
A JWT is decoded with options={"verify_exp": False}, which turns off PyJWT's exp (expiration) 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
With expiry verification disabled, an expired (or stolen and long-since-revoked) token is still accepted, so tokens effectively never expire.
Remove the "verify_exp": False option; PyJWT verifies exp by default, e.g. jwt.decode(token, key, algorithms=["RS256"]). If a token legitimately carries no exp, prefer options={"require": ["exp"]} to mandate one.
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.py.jwt.no-expiration -- <reason>