Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Relax jwt dependency to support ruby-jwt 3.x (>= 2.0, < 4.0)

未关闭
#215 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
冷清
技术栈
ruby
领域
api

调研方向

从 gemspec 的运行时依赖项入手,检查现有的 encode/decode、webhook 签名验证和内部令牌生成入口点。放宽 jwt 约束,然后针对 jwt 2.10.x 和 3.1.x 验证 SDK,确保这些行为在两个版本下都能正常工作。

由索引模型根据 Issue 内容生成。

描述

Summary

getstream-ruby 6.1.1 pins jwt (~> 2.0), which blocks applications from upgrading to ruby-jwt 3.x. Bundler cannot resolve a single bundle when the app (or other gems) require jwt 3.x.

Current behavior

From the published gem (6.1.1):

jwt (~> 2.0)   # resolves to 2.x only (e.g. 2.10.2)

Other common dependencies already allow jwt 3, e.g. googleauth uses jwt (>= 1.4, < 4.0). The blocker for a unified bundle is specifically getstream-ruby's upper bound.

Problem

  • We cannot bundle update jwt to 3.x while using getstream-ruby.
  • Ruby loads one jwt version per process; there is no supported way for the SDK to stay on 2.x while the host app uses 3.x.
  • Workarounds (forking the gemspec, hand-editing Gemfile.lock) are fragile and unsupported.

Use case

We use getstream-ruby for Stream Chat (API client, webhooks, user upsert) and also use jwt directly elsewhere in the app (user tokens, CDN auth, etc.). We want to upgrade to jwt 3.x for security/maintenance alignment with the rest of the ecosystem, without dropping the official SDK.

Requested change

Relax the runtime dependency, for example:

# gemspec
s.add_runtime_dependency "jwt", ">= 2.0", "< 4.0"

Then verify the SDK against jwt 2.10.x and 3.1.x (encode/decode, webhook signature verification, any internal token generation).

Environment

  • getstream-ruby: 6.1.1
  • Ruby: 3.x (Rails 7.2 app)
  • Current resolved jwt: 2.10.2 (due to ~> 2.0 constraint)
主要语言
Ruby
星标
32
派生
23
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

GetStream/stream-chat-ruby 的其他 Issue

查看 GetStream/stream-chat-ruby 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。