-
Notifications
You must be signed in to change notification settings - Fork 73
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
{ canonicalize: true }
stringifies the payload twice
#171
Comments
{ canonicalize: true }
stringifies the payload twice
great catch! |
mirceanis
pushed a commit
that referenced
this issue
May 19, 2021
🎉 This issue has been resolved in version 5.4.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
When using the new
{ canonicalize: true }
param increateJWT
, the JWT generated looks incorrect. It produces something like:IntcImFsZ1wiOlwiRVMyNTZLXCJ9Ig.IntcImFcIjpcImFcIixcInpcIjpcInpcIn0i.aKyOmGo5Dx2VsvDZAAHMxNtgqBeI0-qij4OB2AsISFdGsnNDJNEptZkQjY497mzX1LdMPS84pzykqalPtMwqMQ
(extracted from the tests).The issue is that the lib runs
JSON.stringify
on an already-stringified object:did-jwt/src/JWT.ts
Line 133 in 4cfd3ee
canonicalizeData
returns a string)I can make a PR to remove the extra
JSON.stringify
.Thanks!
The text was updated successfully, but these errors were encountered: