fix: main codex login password fallback#56
Merged
Conversation
- Add password auto-fill fallback when OTP switch fails on Codex OAuth page - Pass saved admin password to MainCodexLoginFlow instead of empty string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
主号 Codex 登录流程(
MainCodexLoginFlow)有两个 bug:密码页无 fallback:
_advance()检测到password_required时,只尝试切换到 OTP 登录(_switch_password_to_otp)。但 Codex OAuth 页面(auth.openai.com/sign-in-with-chatgpt/codex)没有 OTP 选项,导致 OTP 切换必然失败后直接返回unsupported_password错误,流程中断。主号密码未传递:
MainCodexLoginFlow.__init__硬编码password="",未读取管理员登录时已保存的密码(get_admin_password()),即使 fallback 到密码自动填充,填入的也是空字符串。修复
_auto_fill_password()作为 fallback,用已保存的密码自动填入并提交MainCodexLoginFlow初始化时通过get_admin_password()读取已保存的管理员密码影响范围
仅影响
MainCodexLoginFlow(主号 Codex 登录),不影响 member 账号的登录流程。