Skip to content

Widen JWT dependency to allow v3#38

Open
Keith-wright wants to merge 1 commit into
masterfrom
fix/jwt-v3-compatibility
Open

Widen JWT dependency to allow v3#38
Keith-wright wants to merge 1 commit into
masterfrom
fix/jwt-v3-compatibility

Conversation

@Keith-wright
Copy link
Copy Markdown
Contributor

@Keith-wright Keith-wright commented May 27, 2026

Summary

  • Widens the jwt dependency constraint from ~> 2.1, >= 2.1.0 to >= 2.1, < 4
  • Updates Gemfile.lock to resolve to jwt 3.2.0

The previous constraint caused two issues:

  • Ruby 3.4 compatibility — jwt 2.x requires base64 without declaring it as a dependency. Ruby 3.4 removed base64 from its default gems, causing a LoadError at runtime. jwt 3.x declares it explicitly.
  • Downstream conflicts — the narrow ~> 2.1 range 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.

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.
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.

3 participants