You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This piece of the code in sign.js have control over keys order in header option. It causes an unexpected result in generated jwt. Generally, the token is valid but we cannot generate the same token across different technologies.
Current implementation:
While I was reading this issue, this other issue came to my mind: #404
In both cases I think there is no problem from JWT concept around the order of the keys. Although as it is mentioned in the other issue:
In any event, you may want to provide a large warning saying that the key ordering isn't deterministic, and you may generate different signatures for the same payload and secret key pair.
Other than that, what is the issue? Consumer provide header and payload, get a signed string, any other system with that signed string and the proper key/secret will be able to verify it.
This piece of the code in
sign.js
have control over keys order in header option. It causes an unexpected result in generated jwt. Generally, the token is valid but we cannot generate the same token across different technologies.Current implementation:
My proposal:
I'm aware of how the order of keys in js objects works but now it can act in a more predictable way until we use some numeric keys.
The text was updated successfully, but these errors were encountered: