Skip to content

fix(auth): 内测期间关闭公开注册,仅保留已有账号登录 - #327

Open
xiaocheny214 wants to merge 3 commits into
1024XEngineer:mainfrom
xiaocheny214:fix/disable-public-registration
Open

fix(auth): 内测期间关闭公开注册,仅保留已有账号登录#327
xiaocheny214 wants to merge 3 commits into
1024XEngineer:mainfrom
xiaocheny214:fix/disable-public-registration

Conversation

@xiaocheny214

@xiaocheny214 xiaocheny214 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • 内测已上线,但不应对外提供注册。只在后端关闭公开建号路径:POST /auth/registerpurpose=register 发码、验证码登录自动建号。
  • 前端注册入口不改。 页面仍可走到注册,请求会被后端拒绝。以后重新开放只需恢复后端接口。
  • 测试账号由运维/数据库预置,不在仓库写死。

Fixes #326

变更

  • POST /auth/register 返回「内测期间暂不开放注册」
  • send-code 拒绝 purpose=register
  • login-by-code 对未知邮箱返回「账号不存在」,不再自动建号
  • 前端无改动

Test plan

  • POST /auth/register 返回内测关闭文案,不创建用户
  • purpose=register 发码被拒绝且不发邮件
  • 未注册邮箱验证码登录不建号;已有账号验证码登录仍成功
  • 封禁账号、未验证邮箱的验证码登录分支有测试覆盖
  • 前端注册入口仍在;提交后应看到后端拒绝文案
  • 用预置内部账号走密码登录和验证码登录确认可进入工作台

公开注册、注册发码和验证码自动建号都会在内测阶段误开账号。登录入口保留,测试账号由运维预置。

Fixes 1024XEngineer#326

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
windup Ready Ready Preview Aug 15, 2026 10:12am

@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the fixed PR diff across the registration/authentication backend paths and the frontend login entry points. The change consistently blocks public registration, registration-purpose verification codes, and unknown-account code-login auto-provisioning while preserving existing-account login flows and routing the legacy register query to login.

Static Python compilation and git diff --check passed. The focused pytest suites could not run because pytest is not installed in the environment; the affected frontend suites could not run because dependencies are absent and vitest is unavailable.

oxfmt requires the login helper line to stay on one line. This unblocks Frontend CI format:check on 1024XEngineer#327.

Co-authored-by: Cursor <cursoragent@cursor.com>
公开注册只在后端关闭。前端注册入口保持原样,调用时由接口拒绝。补测封禁账号与未验证邮箱的验证码登录,补齐 codecov/patch 缺的两行。

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

内测期间关闭公开注册,仅保留内部账号登录

1 participant