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

fix: Support Deno 2 #8

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

justinmchase
Copy link
Contributor

@justinmchase justinmchase commented Nov 13, 2024

This change is needed to run in Deno 2.

  1. Upgrade the djwt module to latest
  2. The new version of djwt no longer uses god_crypto, therefore upgrade the code to use WebCrypto APIs to import the cert.
  3. WebCrypto only supports pkcs8 but github exports pkcs1 certs by default.
  4. Add documentation on how to convert the github cert into pkcs8 format.
  5. I also added some code to extract the content of the cert into the right format whether or not you leave the header/footer in or not.

@justinmchase justinmchase changed the title chore: Update djwt lib and add docs on how to convert to pkcs8 cert format chore: Support Deno 2 Nov 13, 2024
@justinmchase justinmchase changed the title chore: Support Deno 2 fix: Support Deno 2 Nov 13, 2024
@justinmchase
Copy link
Contributor Author

Also, for what its worth I've added this logic directly into my github-api module so if anyone wants to use that api then its already in it.

jwt.ts Outdated Show resolved Hide resolved
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 this pull request may close these issues.

This is broken in deno 2.0 Broken on Deno 1.13
1 participant