@fastify/jwt is registered with a hard-coded secret string literal.
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
This key signs and verifies every token: committed to git it is one search away from compromise, letting an attacker forge tokens for any user.
Load it from the environment instead (fastify.register(fastifyJwt, { secret: process.env.JWT_SECRET })) and add the variable to .env.example with a placeholder. Rotate the leaked value out of source control. For asymmetric signing pass a key pair ({ private, public }) read from files or a secret manager, not inline.
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.fastify.jwt-hardcoded-secret -- <reason>