Skip to content

fix: main codex login password fallback#56

Merged
cnitlrt merged 1 commit into
cnitlrt:devfrom
EricPrometheus:dev
May 19, 2026
Merged

fix: main codex login password fallback#56
cnitlrt merged 1 commit into
cnitlrt:devfrom
EricPrometheus:dev

Conversation

@EricPrometheus

Copy link
Copy Markdown
Contributor

问题

主号 Codex 登录流程(MainCodexLoginFlow)有两个 bug:

  1. 密码页无 fallback_advance() 检测到 password_required 时,只尝试切换到 OTP 登录(_switch_password_to_otp)。但 Codex OAuth 页面(auth.openai.com/sign-in-with-chatgpt/codex)没有 OTP 选项,导致 OTP 切换必然失败后直接返回 unsupported_password 错误,流程中断。

  2. 主号密码未传递MainCodexLoginFlow.__init__ 硬编码 password="",未读取管理员登录时已保存的密码(get_admin_password()),即使 fallback 到密码自动填充,填入的也是空字符串。

修复

  • 在 OTP 切换失败后,增加 _auto_fill_password() 作为 fallback,用已保存的密码自动填入并提交
  • MainCodexLoginFlow 初始化时通过 get_admin_password() 读取已保存的管理员密码

影响范围

仅影响 MainCodexLoginFlow(主号 Codex 登录),不影响 member 账号的登录流程。

- Add password auto-fill fallback when OTP switch fails on Codex OAuth page
- Pass saved admin password to MainCodexLoginFlow instead of empty string
@cnitlrt cnitlrt merged commit 0d2b05d into cnitlrt:dev May 19, 2026
3 checks passed
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.

2 participants