Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JWKS support #29

Open
ThatOneCalculator opened this issue Apr 16, 2024 · 1 comment
Open

JWKS support #29

ThatOneCalculator opened this issue Apr 16, 2024 · 1 comment

Comments

@ThatOneCalculator
Copy link

As jose supports JWKS for verification, it'd be great if this could too :)

@acrois
Copy link

acrois commented Apr 20, 2024

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

image

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants