config push: changing auth.oauth_server.authorization_url_path fails with 400 (enabled and path must be sent together)
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/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ệ
- supabase, typescript
Hướng nghiên cứu
Đọc apps/cli/src/commands/config/push/push.encoders.ts quanh các mục máy chủ OAuth và so sánh chúng với các nhóm phải đi cùng nhau đối với captcha, SMTP hoặc auth hooks. Tái hiện thao tác push chỉ có đường dẫn trong issue, sau đó kiểm tra xem phần thân request đã mã hóa có bao gồm giá trị enabled hiện tại cùng với đường dẫn đã thay đổi hay không. Hoàn tất khi cập nhật thành công mà không tắt máy chủ OAuth; cũng xác minh trường hợp ngược lại, chỉ thay đổi enabled.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Follow-up to #6367, which was closed as completed. On the new TypeScript CLI the diff half is fixed, but the push half still cannot change authorization_url_path on a project where the OAuth server is already enabled: the plan is correct, the request is rejected with a 400.
Version
supabase@next = 3.0.0-next.4 (via npx), Windows 11. Hosted project with oauth_server_enabled = true and oauth_server_authorization_path = "/oauth/consent".
Reproduce
supabase/config.toml, nothing else declared:
project_id = "<ref>"
[auth.oauth_server]
enabled = true
authorization_url_path = "/.lovable/oauth/consent"
supabase config push --project-ref <ref> --yes
Actual
Updating Auth service with config:
auth.oauth_server.authorization_url_path [update]
local: "/.lovable/oauth/consent"
remote: "/oauth/consent"
HTTP PATCH: https://api.supabase.com/v1/projects/<ref>/config/auth
ConfigPushAuthUpdateStatusError: unexpected status 400:
{"message":"Both OAUTH_SERVER_ENABLED and OAUTH_SERVER_AUTHORIZATION_PATH must be provided together when updating OAuth configuration"}
Nothing is written. config diff afterwards still reports the same update.
Expected
The path is updated. enabled is declared in the file and equals the remote value, so it is (correctly) not a change, but the Management API wants it in the same body as the path.
Likely cause
config push is diff-first and sends only changed fields. In apps/cli/src/commands/config/push/push.encoders.ts the three auth.oauth_server.* entries are plain scalar rows (source), not a required-together group like captcha, SMTP or the auth hooks, where an unchanged member is sent along with its current value. So a path-only change produces a body with oauth_server_authorization_path and no oauth_server_enabled.
Treating oauth_server_enabled + oauth_server_authorization_path as a required-together group should fix it. I have not checked whether the reverse case (changing only enabled) is rejected the same way; the error message suggests it is.
Why it matters
There is no CLI workaround that keeps the server up: the only way to make enabled part of the diff is to flip it, which takes the OAuth server down. On our project this path resets to /oauth/consent on its own from time to time (described in #6367), so being able to pin it from config.toml is the whole point.
Minor, related: with only authorization_url_path declared (no enabled = true), config diff lists the path under unmanaged and compares nothing. That follows ADR 0022, but the message does not say that declaring enabled = true is what makes it comparable.
Happy to test a build against a live project.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.4k
- Fork
- 533
- Merge trung bình
- 22 giờ 20 phút
- Pull request đã merge (30 ngày)
- 370
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 supabase/cli
-
db schema declarative sync: no way to fail (non-zero exit) when the generated migration is destructiveCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở✨ Feature supabase/cli
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
stack: the HTTP gateway closes idle keep-alive connections after 5 s, so a client whose event loop is blocked gets ECONNRESET (`fetch failed`) on its next requestCó thể đã có người làm @7ttp đã nhận 11 ngày trước. Đang mở🐛 Bug supabase/cli
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
supabase/cli#6975 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
📘 Docs supabase/cli
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
supabase/cli#6974 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Migration error caret is missing or misplaced when the statement contains multibyte charactersĐang mở🐛 Bug supabase/cli
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Scoped tokens: supabase link needs API Key Secrets even though db push only needs the DB passwordĐang mở🐛 Bug supabase/cli
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
vercel/streamdown#673 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
docs(stream-protocol): document messageMetatadata on start/finish and the message-metadata chunkĐang mởfactory-active task-identify-harness-labels-done task-identify-issue-type-done
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
vercel/ai#23375 · 1 bình luận ·
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 72/100
agilepathway/label-checker#721 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CLI Empathy needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
chromaui/chromatic-cli#1524 ·
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 72/100
Maintainer thường phản hồi trong vòng 1 ngày