Sign in with Google fails with redirect_uri_mismatch: api callback not registered on the Google client
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 68/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- cpp
- 领域
- api, authentication
调研方向
先从 app/src/SsoBridge.hpp 开始,确认 Google OAuth callback URI,然后针对列出的 client ID 运行 issue 中的 curl 复现。完成的标准是:已授权的重定向 URI 接受 API callbacks,并且 Sign in with Google 进入登录流程,而不是出现 redirect_uri_mismatch;提到了 Apple,但尚未验证。
由索引模型根据 Issue 内容生成。
描述
Summary
On Linux, "Sign in with Google" always ends at Google's error page:
Access blocked: This app's request is invalid
Error 400: redirect_uri_mismatch
Version: v2026.9.19-1050096260 (URnetwork-2026.9.19-1050096260-amd64.AppImage), NixOS, default ur.network / main network space.
Cause
Per app/src/SsoBridge.hpp, the app opens
https://accounts.google.com/o/oauth2/v2/auth?client_id=338638865390-cg4m0t700mq9073smhn9do81mr640ig1.apps.googleusercontent.com
&redirect_uri=<api>/auth/google/callback&response_type=code&scope=openid%20email%20profile&...
Google rejects that redirect URI for this client id before the account is even chosen, so the callback is not registered as an authorized redirect URI on the web client. This is reproducible without the app or a Google session:
CID=338638865390-cg4m0t700mq9073smhn9do81mr640ig1.apps.googleusercontent.com
for r in https://api.ur.network/auth/google/callback https://api.bringyour.com/auth/google/callback; do
curl -s -o /dev/null -w '%{redirect_url}\n' \
"https://accounts.google.com/o/oauth2/v2/auth?client_id=$CID&redirect_uri=$(python3 -c 'import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1],safe=""))' "$r")&response_type=code&scope=openid%20email%20profile&state=x"
done
Both print https://accounts.google.com/signin/oauth/error?authError=ChVyZWRpcmVjdF91cmlfbWlzbWF0Y2g... (base64 of redirect_uri_mismatch). A registered URI redirects to the sign-in page instead.
https://api.ur.network/auth/google/callback (and the api.bringyour.com variant) need to be added to the client's authorized redirect URIs. Sign in with Apple uses the same <api>/auth/apple/callback shape and is probably in the same state, though I have not verified it.
Workaround
Auth code / email sign-in work fine.
Diagnosed with help from Claude Code.
- 主要语言
- C++
- 星标
- 1
- 派生
- 1
- 平均合并
- 2 小时 59 分钟
- 30 天内合并 PR
- 2
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
sistemicorp/scripts#62 ·
-
难度 1/5 1 小时以内 新手友好度 72/100
维护者通常 1 天内回复
-
extended_stabilizer: `std::pow(2, p/2.)` in `scalar_t::to_complex()` takes ~40% of runtime on Linux可能已有人在做 @mehmetniyazikayi 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 74/100
Qiskit/qiskit-aer#2502 ·
维护者通常 1 天内回复
-
Test failure on FreeBSD: #26 unexpected system_clock source可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭low priority rt_lib tests
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
RobLoach/raylib-cpp#440 · 2 条评论 ·