OAuth 登录在多代理配置不一致:用双向 mode/type 兼容 + 全代理同步修复
问题/场景:多代理或多连接器部署中,auth 配置字段 mode/type 不一致会导致 OAuth 回调后状态不同步。前置:可修改 gateway 配置并重启服务。实施步骤:统一配置字段、重启后完成 OAuth 再校验各 agent 会话。关键命令:`openclaw gateway status`、`openclaw gateway restart`。验证:所有 agent 在同一次 OAuth 后均可使用授权状态。风险:旧配置残留会造成部分 agent 仍未同步。来源:GitHub 合并提交。
GITHUBDiscovered 2026-02-20Author openclaw
Prerequisites
- Your deployment has at least 2 agents/connectors sharing OAuth auth state.
- You can edit gateway config and perform a controlled restart window.
Steps
- Export current config and identify mixed auth keys (mode vs type) across connectors.
- Normalize auth config according to current schema, then apply/reload gateway settings.
- Restart gateway and run a fresh OAuth login flow from one primary channel.
- Check all target agents/channels for the same authorized state and run one protected action each.
Commands
openclaw gateway statusopenclaw gateway restartopenclaw statusVerify
A single OAuth login is reflected across all configured agents/channels, and protected actions succeed everywhere.
Caveats
- If you run mixed old/new clients, schema mismatches may still appear until all clients are upgraded.
- Rollback plan should be prepared before auth schema changes in production(需验证).
Source attribution
This tip is aggregated from community/public sources and preserved with attribution.
Open original source ↗