Widen JWT dependency to allow v3#38
Open
Keith-wright wants to merge 1 commit into
Open
Conversation
Changes constraint from ~> 2.1, >= 2.1.0 to >= 2.1, < 4 to allow jwt v3.x. The only usage (JWT.encode with HS256) is compatible with both v2 and v3.
aonemd
approved these changes
May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
jwtdependency constraint from~> 2.1, >= 2.1.0to>= 2.1, < 4Gemfile.lockto resolve to jwt 3.2.0The previous constraint caused two issues:
base64without declaring it as a dependency. Ruby 3.4 removedbase64from its default gems, causing aLoadErrorat runtime. jwt 3.x declares it explicitly.~> 2.1range blocked consumers from upgrading their own jwt dependency. The widened range allows v2 or v3 to resolve without conflict.The gem's only usage is
JWT.encode payload, secret_key, 'HS256', which is unchanged between v2 and v3.