-
Notifications
You must be signed in to change notification settings - Fork 376
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
JWT.encode method breaking changes #249
Comments
@msxavi I am aware of that problem. IMHO: Rewinding it would cause more trouble. Is it possible to test your code against the latest 2.1.0 release of ruby-jwt? This string payload issue was tackeled in #236. Release notes: https://github.com/jwt/ruby-jwt/releases/tag/v2.1.0 |
@msxavi Any updates on this issue? |
@excpt updating ruby-jwt will consequently update json as well and this is leading us to greater updates as the dependencies are many. Still thinking over. |
@msxavi Is this still an issue? Did an update of json work for your use-case? |
@excpt hopefully this confirms a fix and sheds more light for anyone else who stumbles upon this. I had the same issue where JWT.encode would fail on encode for String. I was able to upgrade JWT to 2.1.0 but I was still receiving After investigating further I notice the version of the json gem I was using was 1.8.6. I was able to upgrade the json gem to the latest version (2.1.0) and the problem is now resolved. In rails/ruby console:
|
Hi there!
with
If the maintainers are happy with this approach, I'd be happy to submit a pull request! |
Closing as a stale issue. I think we do not want to introduce any quirks on the JSON parsing. The JWT RFC is pretty clear on that the payload needs to be a valid JSON object. |
Hi guys,
I think you have introduced breaking changes somewhere along the path within a patch upgrade instead of a major version because I've got version 1.5.1, where JWT.encode method works with string:
JWT.encode("host", ENV['SECRET'])
And after updating to 1.5.6 the same method with string "host" raises:
I'd rather have all bugfixes done until version 1.5.6, but with no breaking changes such the aforementioned. Is there anything you can do?
The text was updated successfully, but these errors were encountered: