-
Notifications
You must be signed in to change notification settings - Fork 30
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
Support for JWKS public keys #63
Comments
I believe there's an implementation of support for JWKS specific to auth0 in https://github.com/nearform/fastify-auth0-verify. We also probably want to have this feature integrated in https://github.com/fastify/fastify-jwt but the implementation should live in a standalone library so it can be used outside of fastify-jwt |
This is the AWS Cognito documentation about how to validate the JWTs it generates, which also uses JWKS. https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-verifying-a-jwt.html |
To add more context to this issue:
The package should do
|
I would avoid:
and leave it to jsonwebtoken and this module. |
What has been done up until now:
What is left to do:
|
@conor909 let's do this first:
Which requires that jwks-fetch is published to npm, CI is setup and so on |
The best approach would be: const {createVerifier} = require('fast-jwt')
const buildJwks = require('jwks-fetch')
const verify = createVerifier({ key: buildJwks() }) Essentially making the two modules loosely couple (but working well together). |
there is now a hint about how to do this via get-jwks here. It's not exactly the one liner you had in mind but it's not too bad either |
JWKS public keys are supported by get-jwks package. Please refer get-jwks docs for examples on integration with fast-jwt. Closing this issue. |
We should support fetching from a JWKS url and cache things.
#62 for the caching bit.
The text was updated successfully, but these errors were encountered: