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

[RFC] fastify-auth0-verify #873

Open
simoneb opened this issue May 2, 2023 · 2 comments
Open

[RFC] fastify-auth0-verify #873

simoneb opened this issue May 2, 2023 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@simoneb
Copy link

simoneb commented May 2, 2023

Hey @fastify/plugins, I'd like to hear your thoughts about what we could do with https://github.com/nearform/fastify-auth0-verify.

This plugin was built with the purpose of validating JWTs generated by Auth0, and recently one user brought up that it's not really linked to Auth0 as it's largely spec compliant, although it will require breaking changes to the public API to make it generic and not tied to Auth0.

The work is being done in this PR: nearform/fastify-auth0-verify#291

The next step is deciding what to do with the new version:

  • shall we fork the repo and release a new package with a more generic name, while deprecating the existing package
  • shall we keep developing both at the same time
  • ...

What I'd like to check with you is whether the functionality built into this plugin fits in any existing core plugins instead, so that rather than creating a new package we move the features over to an existing one instead. Note that although this boils down to verifying JWT tokens, it's the way this is done that differs, because it uses JWK, which is a more involved process for validation requiring interaction with an external service.

@jsumners
Copy link
Member

jsumners commented May 2, 2023

Adding it to fastify-jwt could make maintenance difficult and configuration confusing. So my inclination would be to publish fastify-jwt-jwk and update the readme of fastify-jwt to highlight the missing functionality and where to find it.

🤷‍♂️ I could be wrong though. I haven't used either of the plugins in question. The last time I had to deal with this I ended up writing my own plugin that communicated with the auth0 JWKS.

@mcollina
Copy link
Member

mcollina commented May 2, 2023

I would recommend to:

  1. fork the project in a new fastify-jwt-jwks repo
  2. rewrite fastify-auth0-verify as a tiny facade on top of fastify-jwt-jwks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants