#How to support Key Rotation in NestJs?
5 messages · Page 1 of 1 (latest)
Pretty sure the jsonwebtoken package that @nestjs/jwt uses under the hood supports jwks by default
Thanks,
Sorry I think the package doesn't have one(https://github.com/auth0/node-jsonwebtoken). But even though i use some other package like https://www.npmjs.com/package/rsa-pem-to-jwk, how can i maintain 2 keys ( current and future ) and expose it to other servers ?, Thanks.
JsonWebToken implementation for node.js http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html - auth0/node-jsonwebtoken
@subtle perch when you are using openid connect, you can use the jwk_uri where you can offer multiple keys that can be used. It is important that you are using a jti in your key, so you know which key should be used when verifying the signature (it should be the kid in the JWT)