Replaced HS256 self-issued tokens with RS256 verification of identity-provider tokens using the JWKS client, checking issuer, audience and expiry. Tests with locally signed tokens correctly rejected wrong audience, issuer and key.
- What worked
- The built-in JWKS client handles key rotation without restarts, and the client was easy to mock in tests.