Skip to content

fix(connectors): 自定义 MCP OAuth 刷新失败后标记重新授权 - #474

Merged
jubaoliang merged 1 commit into
developfrom
feature/custom-mcp-oauth-reauth
Aug 29, 2026
Merged

fix(connectors): 自定义 MCP OAuth 刷新失败后标记重新授权#474
jubaoliang merged 1 commit into
developfrom
feature/custom-mcp-oauth-reauth

Conversation

@jubaoliang

Copy link
Copy Markdown
Collaborator

Summary

  • Token 刷新失败且已过期时,丢弃失效凭证并标记 oauth.required,让 Dashboard 引导重新授权;未过期则保留现有 token。
  • OAuth 发现结果进程内缓存 1 小时,减少对 MCP URL 的重复探测。
  • OAuth callback 页与启动失败文案走 i18n(en/zh);补充 callback 落库与统一 POST /connectors/oauth/start 的测试;文档同步自定义 MCP OAuth 约定。

Test plan

  • uv run pytest tests/unit/connectors tests/integration/test_connectors_api.py tests/unit/i18n -q
  • 自定义 MCP:token 过期且 refresh 失败后,API 预览出现需重新授权,重新走 OAuth 可写回 token
  • 自定义 MCP:token 仍有效时 refresh 失败,不误清凭证
  • OAuth callback 成功/失败页按 Accept-Language 显示中英文

Made with Cursor

Expired tokens that cannot be refreshed now prompt the dashboard to re-authorize. Cache OAuth discovery for an hour, and localize callback and start-error copy.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jubaoliang
jubaoliang merged commit 17effe4 into develop Aug 29, 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