Description
src/auth/jwt.strategy.ts defines JwtStrategy.validate(payload), which returns { sub: payload.sub, publicKey: payload.publicKey ?? payload.sub } — falling back to sub when publicKey is missing from the token payload. There is no jwt.strategy.spec.ts file anywhere in the repo, so this fallback logic (which several other tests rely on implicitly when signing test JWTs with only sub) has no dedicated unit test.
Deliverables
Description
src/auth/jwt.strategy.tsdefinesJwtStrategy.validate(payload), which returns{ sub: payload.sub, publicKey: payload.publicKey ?? payload.sub }— falling back tosubwhenpublicKeyis missing from the token payload. There is nojwt.strategy.spec.tsfile anywhere in the repo, so this fallback logic (which several other tests rely on implicitly when signing test JWTs with onlysub) has no dedicated unit test.Deliverables
src/auth/jwt.strategy.spec.tsvalidate()with a payload containing bothsubandpublicKeyvalidate()with a payload containing onlysub, assertingpublicKeyfalls back to it