Hosts cannot start a quiz in local Docker: ws-server has no JWT_SECRET
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 76/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- docker-compose, typescript
- 领域
- devops, documentation
调研方向
先阅读 docker-compose.yml 和 setup.md,然后检查 apps/ws-server/.env.example 以及 http-server 加载其 .env 的方式,以找出 JWT_SECRET 的共享来源。将匹配的值传递给 ws-server,并记录其环境文件以及 secret 必须匹配的要求;考虑是否应在启动时因使用回退值而失败。完成标准是:按照指南,在新克隆的项目中运行 docker-compose up 后能够启动一个问答游戏。
由索引模型根据 Issue 内容生成。
描述
Since #156 was fixed, ws-server verifies the host's login token before letting a socket run a quiz. It reads the same JWT_SECRET that http-server uses to sign that token.
docker-compose.yml never passes it:
ws-server:
environment:
- DATABASE_URL=postgresql://postgres:postgres@db:5432/Qtrive
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_PASSWORD=thisistheredisPassword
# no JWT_SECRET
Both services fall back to the literal string "secret" when the variable is missing. http-server reads its own .env, which setup.md tells you to fill in with a real value — so in a default Docker setup the two services end up with different secrets.
Why it matters
Every host join is rejected with ORGANIZER_AUTH_FAILED. The quiz lobby loads, the join code shows, participants can join — but Start Game does nothing, and the only clue is a message in the browser console.
A new contributor follows setup.md exactly and hits a quiz they cannot start, with no obvious cause. This is the first thing someone will trip over.
What a fix looks like
- Pass
JWT_SECRETthrough tows-serverindocker-compose.yml, from the same sourcehttp-serveruses, so the two cannot drift. setup.mddocuments a.envforpackages/db,apps/http-serverandapps/genAI, but never one forapps/ws-server. Add it, pointing atapps/ws-server/.env.example, and say plainly that the value must matchhttp-server.- Worth considering whether the
|| "secret"fallback should stay at all. Failing loudly at startup when the variable is missing would have made this obvious instead of silent.
Definition of done
docker-compose upgives a working host flow with no manual env editingsetup.mdlists every.enva fresh clone needs- Starting a quiz works locally straight after following the setup guide
Good first issue: a few lines of YAML and a docs edit, but it unblocks everyone who clones the repo.
- 主要语言
- TypeScript
- 星标
- 21
- 派生
- 7
- 平均合并
- 3 小时 39 分钟
- 30 天内合并 PR
- 16
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TheCodeHeist-Coder/Rexial 的其他 Issue
-
documentation good first issue help wanted
难度 2/5 1-3 小时 新手友好度 78/100
TheCodeHeist-Coder/Rexial#195 ·
维护者通常 1 天内回复
-
Backend first issue bug help wanted
难度 2/5 1-3 小时 新手友好度 84/100
TheCodeHeist-Coder/Rexial#193 ·
维护者通常 1 天内回复
-
Backend first issue bug good first issue help wanted
难度 2/5 1-3 小时 新手友好度 86/100
TheCodeHeist-Coder/Rexial#192 ·
维护者通常 1 天内回复
-
Backend first issue bug good first issue help wanted
难度 2/5 1-3 小时 新手友好度 82/100
TheCodeHeist-Coder/Rexial#191 ·
维护者通常 1 天内回复
-
good first issue help wanted UI & UX
难度 2/5 1-3 小时 新手友好度 90/100
TheCodeHeist-Coder/Rexial#190 ·
维护者通常 1 天内回复
查看 TheCodeHeist-Coder/Rexial 的全部 Issue
相似的 Issue
-
area:desktop bug documentation
难度 2/5 1-3 小时 新手友好度 76/100
anthropics/claude-code#104801 ·
维护者通常 1 天内回复
-
check:passed streams:add
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
spudly/design-system#110 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefix可能已有人在做 @ItsDeadlyProgrammer 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
appsmithorg/appsmith#42471 · 1 条评论 ·
维护者通常 2 天内回复