Skip to content

feat(oauth): brand the browser page shown after sign-in - #1666

Merged
Dumbris merged 1 commit into
mainfrom
claude/post-auth-branding-links-cfa511
Oct 20, 2026
Merged

Dumbris merged 1 commit into
mainfrom
claude/post-auth-branding-links-cfa511

Conversation

@Dumbris

@Dumbris Dumbris commented Oct 18, 2026

Copy link
Copy Markdown
Member

Summary

The browser page shown after an upstream OAuth sign-in (/oauth/callback on the loopback callback listener) was bare, unstyled HTML. It now shows:

  • the MCPProxy shield logo (inlined SVG — the callback listener serves only this response, so no asset route or network fetch);
  • a success / failure card (green / red accent) with light and dark themes and a phone-width layout;
  • links to the website, the OAuth docs and the GitHub repo (target=_blank, rel="noopener noreferrer").

Behaviour notes:

  • Auto-close removed. The success page used to call window.close() after 2s. Where that fires it hides the new links; for tabs the user's browser opened normally it is ignored anyway. The page now stays open.
  • Rendering moved to html/template (internal/oauth/callback_page.go); title and message remain escaped, since the failure message embeds the provider's error / error_description.
  • The callback responses now send Content-Type: text/html; charset=utf-8.
  • Success is still reported only when the code was delivered to the waiting flow (GitHub MCP OAuth DCR opens authorization URL with empty client_id #975); no change to callback dispatch.

Testing

  • go test -race ./internal/oauth — new callback_page_test.go covers branding/links, outcome variants (no auto-close), and escaping of injected provider text; existing callback dispatch tests unchanged and green.
  • Manual, against tests/oauthserver/cmd/server + a scratch mcpproxy serve: success flow (server went ready, 2 tools), -auth-error access_denied failure page, light/dark and 375px width.

The OAuth callback page was bare unstyled HTML. It now carries the
MCPProxy logo (inlined SVG, no extra route or network fetch), a
success/failure card with light and dark themes, and links to the
website, the OAuth docs page and the GitHub repository.

The 2s window.close() on success is dropped: where it fires it hides
the new links, and browsers ignore it for tabs they did not open by
script anyway. Title and message stay escaped (html/template), since
the failure message embeds the provider's error text. The response
now declares charset=utf-8.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

📦 Build Artifacts

Workflow Run: View Run
Branch: claude/post-auth-branding-links-cfa511

Available Artifacts

  • archive-darwin-amd64 (32 MB)
  • archive-darwin-arm64 (28 MB)
  • archive-linux-amd64 (19 MB)
  • archive-linux-arm64 (17 MB)
  • archive-windows-amd64 (31 MB)
  • archive-windows-arm64 (28 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (27 MB)
  • installer-dmg-darwin-arm64 (25 MB)
  • smart-mcp-proxymcpproxy-go5XY3AO.dockerbuild (0 MB)

How to Download

Option 1: GitHub Web UI (easiest)

  1. Go to the workflow run page linked above
  2. Scroll to the bottom "Artifacts" section
  3. Click on the artifact you want to download

Option 2: GitHub CLI

gh run download 39114784481 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/oauth/callback_page.go 80.00% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@Dumbris
Dumbris merged commit 1b5c0d1 into main Oct 20, 2026
47 checks passed
@Dumbris
Dumbris deleted the claude/post-auth-branding-links-cfa511 branch October 20, 2026 09:29
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