Join our community: https://t.me/+DOylgFv1jyJlNzM0
Why this matters
backend/src/types/auth.types.ts defines the shape of the JWT payload issued by middleware/auth.ts. Without iss/aud claims, a token minted for this API could theoretically be replayed against another service sharing the same signing secret, and there's no defense-in-depth check that a token was actually issued for this API.
Acceptance criteria
Files to touch
backend/src/types/auth.types.ts
backend/src/middleware/auth.ts
Out of scope
- Rotating the JWT signing secret
- Multi-tenant token scoping
Why this matters
backend/src/types/auth.types.tsdefines the shape of the JWT payload issued bymiddleware/auth.ts. Withoutiss/audclaims, a token minted for this API could theoretically be replayed against another service sharing the same signing secret, and there's no defense-in-depth check that a token was actually issued for this API.Acceptance criteria
issandaudfields to the payload type and to token issuanceiss/audon token verification, rejecting mismatchesFiles to touch
backend/src/types/auth.types.tsbackend/src/middleware/auth.tsOut of scope