Skip to content

Support jwt gem 3.x alongside 2.x#726

Merged
arpit-jn merged 1 commit into
auth0:masterfrom
dan98765:support-jwt-3
May 28, 2026
Merged

Support jwt gem 3.x alongside 2.x#726
arpit-jn merged 1 commit into
auth0:masterfrom
dan98765:support-jwt-3

Conversation

@dan98765
Copy link
Copy Markdown
Contributor

@dan98765 dan98765 commented May 5, 2026

Changes

Widens the jwt runtime dependency from ~> 2.7 (which caps at < 3.0) to >= 2.7, < 4.0. This lets consumers that depend on both auth0 and a gem requiring jwt 3.x (e.g. workos >= 6.0) resolve without conflicts.

No code changes — just the gemspec constraint and the lockfile.

References

Testing

Ran the full test suite (bundle exec rake test) on Ruby 3.3.9 with jwt 3.1.2 resolved:

  • 1040 unit examples, 0 failures
  • 164 integration examples, 0 failures (1 pending — pre-existing)
  • Line coverage: 99.56%

No new tests needed since this is a dependency constraint change and all existing JWT-related tests already pass against 3.x.

  • This change adds unit test coverage
  • This change adds integration test coverage
  • This change has been tested on the latest version of Ruby

Checklist

  • I have read the Auth0 general contribution guidelines
  • I have read the Auth0 Code of Conduct
  • All existing and new tests complete without errors
  • Rubocop passes on all added/modified files (note: rubocop fails to start due to a pre-existing config issue in .rubocop_todo.ymlMetrics/LineLength renamed to Layout/LineLength — unrelated to this change)
  • All active GitHub checks have passed

@dan98765 dan98765 requested a review from a team as a code owner May 5, 2026 17:44
@dan98765 dan98765 mentioned this pull request May 5, 2026
5 tasks
@arpit-jn
Copy link
Copy Markdown
Contributor

arpit-jn commented May 8, 2026

LGTM. The change is minimal, well-scoped, and the test results are convincing (1040 unit + 164 integration, zero failures on jwt 3.1.2).

Ask: Could you rebase onto master to resolve the Gemfile.lock conflict? We just shipped v5.19.0 which updated the lockfile. Should be a quick bundle install after rebase.

Widen the jwt dependency from `~> 2.7` (which caps at < 3.0) to
`>= 2.7, < 4.0`.  This allows consumers that depend on both auth0 and
a gem requiring jwt 3.x (e.g. workos >= 6.0) to resolve without
conflicts.

Full test suite (1040 unit + 164 integration examples) passes on
jwt 3.1.2 / Ruby 3.3.9 with zero failures.

Closes auth0#690
@dan98765
Copy link
Copy Markdown
Contributor Author

dan98765 commented May 8, 2026

Ask: Could you rebase onto master to resolve the Gemfile.lock conflict? We just shipped v5.19.0 which updated the lockfile. Should be a quick bundle install after rebase.

No prob, updated.

@dan98765
Copy link
Copy Markdown
Contributor Author

Rebased and conflict resolved — anything else needed to get this merged?

@joshgaber
Copy link
Copy Markdown

@arpit-jn @dan98765 Now that the Ruby-JWT maintainers have published CVE-2026-44351, I'm sure a lot of users are scrambling to upgrade this gem as soon as possible. Is there anything we can do to help expedite this?

Second question: Should the jwt version be pegged to 3.2 or higher? I'd imagine you'd want to prevent developers from using insecure gems with your product where possible.

@krijnr
Copy link
Copy Markdown

krijnr commented May 26, 2026

We need this now: CVE-2026-44351
We are out of compliance for vulnerability management due to this issue.
Auth0 is who we trust for our auth... (should we?)

@arpit-jn
Copy link
Copy Markdown
Contributor

Apologies for the delay here. Merging this now and will cut a release tomorrow so the updated constraint is available on RubyGems.

Re the CVE concern from @joshgaber, the widened constraint (>= 2.7, < 4.0) allows both patched versions (2.10.3 for 2.x, 3.2.0 for 3.x). We can't exclude only vulnerable ranges in a single gemspec constraint without forcing everyone onto 3.x, so the pragmatic approach is to unblock the upgrade path and let users resolve to the patched version via bundle update jwt.

@krijnr Once the release is published, updating your Gemfile.lock should get you to the patched jwt version.

Thanks @dan98765 for the contribution.

@arpit-jn arpit-jn merged commit f966804 into auth0:master May 28, 2026
10 of 11 checks passed
@arpit-jn arpit-jn mentioned this pull request May 29, 2026
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.

4 participants