A JWT is decoded with a verification key but WITHOUT an explicit algorithms allowlist.
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
Without pinning the accepted algorithms, PyJWT may accept a token signed with an unexpected algorithm, enabling algorithm-confusion attacks (e.g. an RS256 verifier tricked into treating an attacker-supplied HS256 token as valid by using the public key as an HMAC secret).
Always pass an explicit allowlist: jwt.decode(token, key, algorithms=["RS256"]) (or the exact algorithm you expect). List only the algorithms your application actually uses.
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-algorithms -- <reason>