Zaubrik / djwt

Create and verify JSON Web Tokens (JWT) with Deno or the browser.
MIT License
225 stars 23 forks source link

Update god_crypto on version 1.7 #43

Closed asantos00 closed 3 years ago

asantos00 commented 3 years ago

Hi there,

Thanks for your work on djwt, it's the go-to solution for using jwt in Deno, and it's been evolving great. It happens that there are libraries using djwt (like https://github.com/halvardssm/oak-middleware-jwt) that are still heavily coupled to the old API, before 1.8 (validateJwt and so on) and will take a while to update.

They work just fine with the latest versions of Deno, except that they're having problems with the "abstract async" methods on god_crypto (fixed on this PR) https://github.com/invisal/god_crypto/releases/tag/v1.4.6.

It happens that version 1.7 of djwt (which is the one with the old API) is still locked to a version of god_crypto where this breaks.

Sending this PR so that people using version 1.7 can update (for instance into 1.7.1) and get everything to work just fine with the old API and the new versions of deno. This shouldn't be merged on master but on the 1.7 release branch.

Do you think that's feasible? Let me know if I can help.

Thanks

timonson commented 3 years ago

Hi @asantos00 I am sorry for the inconveniences the API change has caused and I would like to help. Would it be good enough if I created a new branch with your desired changes and you could import djwt from this branch?

asantos00 commented 3 years ago

Hi,

Yes, I think creating a branch with the changes would already be a nice help!

Just out of curiosity, the changes were to make the API simpler and more modular, or were there any other technical challenges? Asking this because I'm also thinking if I can help refactoring the oak middleware to support the newest changes.

Thanks!

timonson commented 3 years ago

Would you mind chatting in discord for a second?

timonson commented 3 years ago

Closed with https://github.com/timonson/djwt/pull/45