Skip to content

Widen JWT dependency to allow v3#38

Merged
Keith-wright merged 1 commit into
masterfrom
fix/jwt-v3-compatibility
May 28, 2026
Merged

Widen JWT dependency to allow v3#38
Keith-wright merged 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.
@Keith-wright Keith-wright merged commit 685fc41 into master May 28, 2026
3 of 6 checks passed
Keith-wright pushed a commit that referenced this pull request May 28, 2026
Restores the jwt 3.2.0 lock and base64 dependency that were lost
during conflict resolution when rebasing onto the merged #38 fix.
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