bug: `gws auth setup` writes double-serialized client_id/client_secret into client_secret.json (causes 401 invalid_client)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- 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ệ
- rust
- Lĩnh vực
- authentication, cli
Hướng nghiên cứu
Start by reproducing the issue with gws auth setup and inspect the generated ~/.config/gws/client_secret.json, focusing on how the OAuth credentials are serialized. Confirm the fix by checking that client_id and client_secret contain plain values and that a subsequent gws auth login succeeds without invalid_client.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
gws version: 0.22.5 (installed via npm on Windows 10)
Steps to reproduce:
- Run
gws auth setup - Complete
gcloud auth loginwhen prompted - Choose "Create new project"
- Let the wizard finish (creates OAuth client, writes
~/.config/gws/client_secret.json) - Run
gws auth login
Actual behavior:
The generated client_secret.json has its client_id and client_secret fields filled with the entire JSON credentials object (double-serialized as a string) instead of the plain values:
{
"installed": {
"client_id": "{\"installed\":{\"client_id\":\"123-abc.apps.googleusercontent.com\",...,\"client_secret\":\"REDACTED\",...}}",
"client_secret": "{\"installed\":{...same blob...}}"
}
}
This causes every subsequent gws auth login attempt to fail with:
error[auth]: OAuth flow failed: Server error: invalid_client: The OAuth client was not found.
The printed "Open this URL in your browser to authenticate" link also contains the malformed client_id query param, so manually fixing the URL alone does not help until the underlying file is fixed.
Workaround:
Manually edit client_secret.json and replace client_id/client_secret with the actual plain values extracted from the nested string, then gws auth login works correctly.
Expected behavior:
gws auth setup should write the plain client_id/client_secret strings, not a re-serialized copy of the whole credentials object.
- Ngôn ngữ chính
- Rust
- Star
- 32.3k
- Fork
- 2k
- Merge trung bình
- 16 giờ 3 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
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 khác của googleworkspace/cli
-
`gws auth login` keeps the old token cache, so API calls use a token from the previous grantĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
googleworkspace/cli#984 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
auth export masks secrets by default with no warning; consumers fail later with invalid_clientĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
googleworkspace/cli#983 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Replace gemini with agyĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
googleworkspace/cli#958 ·
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 82/100
googleworkspace/cli#921 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add cli to awesome-ai-plugins?Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
googleworkspace/cli#920 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của googleworkspace/cli
Issue tương tự
-
area:cli area:security bug priority:medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
rtk-ai/rtk#5127 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
status: new topic: ga4gh-sdk type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
comp-rbac
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ClickHouse/ClickHouse#131875 ·
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 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug(python): read_transaction raises TypeError on a Rewrite with rewritten indicesCó thể đã có người làm @Borg93 đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
lance-format/lance#11117 ·
Maintainer thường phản hồi trong vòng 2 ngày