Sign in with Google fails with redirect_uri_mismatch: api callback not registered on the Google client
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cpp
- Lĩnh vực
- api, authentication
Hướng nghiên cứu
Bắt đầu với app/src/SsoBridge.hpp để xác nhận Google OAuth callback URI, sau đó chạy bản tái hiện bằng curl từ issue cho client ID được liệt kê. Được xem là hoàn tất khi các URI chuyển hướng được ủy quyền chấp nhận API callbacks và Sign in with Google đi đến luồng đăng nhập thay vì redirect_uri_mismatch; Apple được đề cập nhưng chưa được xác minh.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C++
- Star
- 1
- Fork
- 1
- Merge trung bình
- 2 giờ 59 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
[BUG] Clipboard History: Buffer over-read in WideCharToMultiByte on double-click pasteCó thể đã có người làm @softmgr đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
notepad-plus-plus/notepad-plus-plus#18519 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
justcallmekoko/ESP32Marauder#1635 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
3.7.6-dev commit 80481ea - files not centered when resolution differs and zoom = "pixel-to-pixel"Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
grizzlypeak3d/DJV#931 ·