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

Provide fully decoded jwt object to key callback #330

Closed
hauptmedia opened this issue May 8, 2023 · 3 comments · Fixed by #335
Closed

Provide fully decoded jwt object to key callback #330

hauptmedia opened this issue May 8, 2023 · 3 comments · Fixed by #335
Assignees

Comments

@hauptmedia
Copy link

Hi,

it would really simplify my integration scenario if the complete decoded JWT object is passed to the key callback here:

https://github.com/nearform/fast-jwt/blob/master/src/verifier.js#L327

I want to dynamically resolve the key based on the issuer (iss) and need to have access to the payload.

Unfortunately this would be a breaking change because the header is now not the root level object anymore. Perhaps it could make sense to make this configurable?

What do you think?

Cheers,

Julian

@guilhermelimak
Copy link
Contributor

@hauptmedia Can you try this PR and see if it works properly for your use case?

@hauptmedia
Copy link
Author

Works great, thank you

@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 3.0.0 🎉

The release is available on:

Your optic bot 📦🚀

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

Successfully merging a pull request may close this issue.

2 participants