`config push` sets `external_email_enabled = false` when `[auth.email] enable_signup = false`, disabling password sign-in for all users
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- postgresql, typescript
- 领域
- authentication, cli
调研方向
The bad mapping is the boolRow call at packages/config/src/project-config/registry-auth.ts:597, which ties [auth.email] enable_signup to external_email_enabled. Read the config schema parsing that rejects an enabled key under [auth.email], and the config push path that writes the auth config. Done means signup can be disabled without flipping external_email_enabled, with a test covering the config push mapping. The issue offers two fixes, so confirm the approach with a maintainer before writing code.
由索引模型根据 Issue 内容生成。
描述
Summary
Running supabase config push against a remote project whose config.toml has [auth.email] enable_signup = false sets the project's external_email_enabled to false. Email/password sign-in then fails for every user with 422 email_provider_disabled, while the CLI reports the auth config as updated / up to date.
Version
Reproduced on CLI 2.109.1 (2026-07-17). The mapping is still on main at 753520f (2026-10-06): packages/config/src/project-config/registry-auth.ts:597, boolRow(["auth","email","enable_signup"], "external_email_enabled"). Latest release checked: v2.120.0.
Steps to reproduce
- A remote project with the email provider enabled; email/password sign-in works.
supabase/config.tomlcontains:
The intent is no public self-signup: accounts are created by admins through the Admin API.[auth] enable_signup = false [auth.email] enable_signup = falsesupabase config push --project-ref <ref>POST /auth/v1/token?grant_type=passwordwith valid credentials.
Expected
[auth.email] enable_signup = false disables email signup only. Existing users can still sign in, and external_email_enabled stays true.
Actual
external_email_enabled flips true -> false (read back from GET /v1/projects/{ref}/config/auth). Sign-in returns 422 email_provider_disabled for everyone. The CLI prints no warning.
No workaround in config.toml
Adding enabled = true under [auth.email] is rejected ('auth.email' has invalid keys: enabled), and that parse error also breaks supabase db push. So a project that wants signup disabled cannot use config push at all.
Recovery
curl -X PATCH https://api.supabase.com/v1/projects/<ref>/config/auth \
-H "Authorization: Bearer $SUPABASE_ACCESS_TOKEN" -H 'Content-Type: application/json' \
-d '{"external_email_enabled": true}'
Related
- supabase/supabase#40582 (open, no replies)
- supabase/cli#4469 (closed unmerged)
Suggested fix
Do not map [auth.email] enable_signup onto the provider toggle external_email_enabled, or accept [auth.email] enabled in the schema so the provider can be kept on explicitly.
- 主要语言
- TypeScript
- 星标
- 2.4k
- 派生
- 537
- 平均合并
- 21 小时 24 分钟
- 30 天内合并 PR
- 378
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
supabase/cli 的其他 Issue
-
config push: changing auth.oauth_server.authorization_url_path fails with 400 (enabled and path must be sent together)可能已有人在做 @itz-puneet 于 1 天前认领。 未关闭🐛 Bug supabase/cli
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
db schema declarative sync: no way to fail (non-zero exit) when the generated migration is destructive可能重新可做 关联的 PR 已关闭且未合并。 未关闭✨ Feature supabase/cli
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
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 request可能已有人在做 @7ttp 于 15 天前认领。 未关闭🐛 Bug supabase/cli
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
📘 Docs supabase/cli
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
🐛 Bug supabase/cli
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
相似的 Issue
-
bug priority: P2
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 73/100
mattermost/compass-design#106 ·
维护者通常 1 天内回复
-
clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster P2
难度 2/5 1-3 小时 新手友好度 76/100
openclaw/openclaw#176671 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
nordcraftengine/nordcraft#1400 ·
维护者通常 1 天内回复