Sign in with Google fails with redirect_uri_mismatch: api callback not registered on the Google client
まだ誰も着手していません。
評価
- 難易度
- 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分
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
似ている issue
-
agent:WSL bug code-review linux LOW
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
category:port-update
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 2 日以内に返信
-
[BUG] SOLE B94 (current model): Set Target Resistance Level rejected with 80 04 03 – bike expects 0.1 units対応中かも @cagnulein が今日担当しました。 オープン
難易度 2/5 半日 初心者へのやさしさ 78/100
cagnulein/qdomyos-zwift#5380 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
improvement ui
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ihhub/fheroes2#11062 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信