Open ThatOneCalculator opened 5 months ago
It appears you can simply pass the JWKS as the "secret" parameter and achieve this. It is not documented, but essentially as long as secret is not a key it will get passed to the second parameter of jwtVerify, thus achieving this outcome.
Works as of 1.0.2 (67078d5).
The second parameter overloads to accept getKey: JWTVerifyGetKey
The type isn't properly exported by this library, but that doesn't stop me..
Here's an example: https://gist.github.com/acrois/8f9c6a0e2d3b6ee6744a0b7a87a2fa56
I added support for this in #30 which includes the type fixes you need to move forward without error.
As
jose
supports JWKS for verification, it'd be great if this could too :)