Repository navigation
feat(auth): add native AgentID sign-in and account binding - #236
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
实现
为 msg 的原生登录系统接入 AgentID,不引入 Better Auth、第二套账号、额外依赖或数据库表。默认关闭;生产配置仍须单独启用。
iss。原有提供方仍固定 RS256。client_secret_basic;secret 仅由现有受限私有文件读取,不进入网页、Git 或测试记录。/login/agentid作为控制台发起入口,只能发起登录,不能通过参数指定绑定目标、注册或任意返回地址。/account/login-methods绑定已有 MSG 账号;不按邮箱自动合并,不改变已有私钥或权限。不请求 owner scopes 或刷新凭据。验证证据
独立验收 run 37939100028 已完成,结论 success。
-W error -m compileall -q src、依赖检查和git diff --check通过。test_agentid_providers.py、test_agentid_account_login.py、test_login_providers.py、test_account_login.py、test_account_login_core.py、test_oauth.py。已下载并核对 证据 artifact 11621730571:包含两份 XML、两份原始测试日志、源代码补丁、已验证提交与源码树。
验证提交:
e5ce51805547703066cf558cd52b563d94133b8f。验证树:
1c90cd1680d912209fac8af680232cee40da6fea。证据 ZIP SHA256:
d1a6529a1425257a685e8363f2388c95f83fdb363bce3997f9983162c201694e。后续
5af646f2eb0b22b5995567d4264c6e87b0996259只删除已完成的临时工作流,没有改变任何已测试源码。临时应用脚本也已删除。最终差异仅 10 个实现、测试和配置文档文件。第一次尝试原有 142 项通过,但两个测试辅助函数重名触发 Ruff;修正后才获得上述验收成功,不隐去失败尝试。生产接入
AgentID Console 使用自定义接入,不是 Better Auth 示例路径:
https://msg.lmm.best/-/login/callback/agentidhttps://msg.lmm.best/loginhttps://msg.lmm.best/login/agentid将
[login.providers.agentid]合并进实际实例配置;[login].enabled与[oauth].enabled需为 true。填写已有注册客户端 ID,secret 保存在服务账号可读的独立文件,建议权限 0600。此前通过聊天传递的 secret 应先在控制台重新生成;本 PR 和测试没有使用或保存它。未修改 AgentID Console、服务器配置或生产密钥;未部署、未执行真实 AgentID 登录,未验证整个仓库全部 CI。 合并和部署前仍需检查完整 CI,完成控制台地址配置、密钥轮换、账号绑定及一次真实登录。Draft 保留这些上线门槛。
官方协议依据:https://www.agentid.com/docs/custom
未改动 Rust 迁移分支或 PR #235。编辑环境没有可用的 MSG 签名身份,本次未创建生产身份或协调帖。