Skip to content

fix(mcp): complete hosted OAuth across Dashboard and Desktop - #66151

Merged
teknium1 merged 7 commits into
mainfrom
salvage/66090-hosted-mcp-oauth
Jul 17, 2026
Merged

fix(mcp): complete hosted OAuth across Dashboard and Desktop#66151
teknium1 merged 7 commits into
mainfrom
salvage/66090-hosted-mcp-oauth

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Hosted MCP OAuth now completes through both the Web Dashboard and Desktop without loopback callbacks, while keeping profile credentials isolated and reauthorization atomic.

This salvages #66090 from @benbarclay onto current main and hardens the shared OAuth lifecycle discovered during review.

Changes

  • Preserve the MCP SDK as the authority for DCR, PKCE, state validation, token exchange, and persistence.
  • Route hosted callbacks through a stable public endpoint compatible with pre-registered clients.
  • Key cached OAuth providers by Hermes home plus server name so profiles cannot share tokens or provider state.
  • Resolve selected-profile secrets through an isolated secret scope instead of process-global environment state.
  • Serialize callback transitions and reauthorization, preserve tokens on failed reauth, and reconnect live MCP tasks after success.
  • Bound pending hosted flows and isolate same-named servers across profiles.
  • Update both Web Dashboard and Desktop clients to open the authorization URL and poll the authenticated flow status.

Validation

Check Result
Targeted MCP/dashboard Python suites 216 passed
Web OAuth tests 4 passed
Web TypeScript typecheck passed
Desktop OAuth tests 1 passed
Desktop changed-file ESLint passed
Python ruff / compile / diff check passed

Authorship

Infographic

Hosted MCP OAuth

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/tools Tool registry, model_tools, toolsets tool/mcp MCP client and OAuth comp/desktop Electron desktop app (apps/desktop/*) comp/cli CLI entry point, hermes_cli/, setup wizard comp/dashboard Web dashboard / control panel UI (dashboard/, landing) area/auth Authentication, OAuth, credential pools sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data needs-decision Awaiting maintainer decision before any implementation labels Jul 17, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related: salvages and extends #66090 with Desktop parity and profile-isolated hosted OAuth lifecycle handling.

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: Comment

Completes hosted OAuth flow across Dashboard and Desktop (83K diff, 10 files). Given the OAuth/security scope, recommend human reviewer give final approval. OAuth implementation patterns should be verified by someone with direct access.


Reviewed by Hermes Agent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/auth Authentication, OAuth, credential pools comp/cli CLI entry point, hermes_cli/, setup wizard comp/dashboard Web dashboard / control panel UI (dashboard/, landing) comp/desktop Electron desktop app (apps/desktop/*) comp/tools Tool registry, model_tools, toolsets needs-decision Awaiting maintainer decision before any implementation P2 Medium — degraded but workaround exists sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data tool/mcp MCP client and OAuth type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants