Skip to content

fix(mcp): OAuth-reserved state param#233

Merged
ducnmm merged 13 commits into
stagingfrom
dev
Jun 4, 2026
Merged

fix(mcp): OAuth-reserved state param#233
ducnmm merged 13 commits into
stagingfrom
dev

Conversation

@harrymove-ctrl

Copy link
Copy Markdown
Collaborator

No description provided.

ducnmm and others added 12 commits June 4, 2026 00:12
[codex] Fix wallet sign-in copy and relayer URLs
… state param (WALM-86)

- MCP defaults and env presets now resolve to memory.walrus.xyz (prod) and
  relayer-staging / staging.memory.walrus.xyz (staging), removing the temporary
  Cloudflare memwal.ai redirect dependency. dev preset unchanged.
- Rename the connect-URL CSRF query param `state` -> `connectState`. `state` is
  a reserved OAuth 2.0 response parameter: the consent page reuses the current
  page URL as the Google/Enoki redirect_uri, and Google rejects any redirect_uri
  carrying a reserved param ("invalid_request: Invalid redirect_uri contains
  reserved response param state"). The callback POST body field stays `state`;
  ConnectMcp reads `connectState` with a `state` fallback for older bridges.
…low (WALM-86)

Signing in with Google from /connect/mcp failed with redirect_uri_mismatch:
Enoki defaults its redirect_uri to window.location.href, so the dynamic
/connect/mcp?...&connectState=... URL was sent as the redirect_uri and never
matched a registered Authorized redirect URI (the dashboard works because its
redirect_uri is the already-registered app root).

- Pin the Google provider redirectUrl to `${origin}/` (the registered root),
  so MCP-connect Google sign-in reuses the same redirect_uri the dashboard
  uses — no Google Console change needed.
- Preserve the /connect/mcp request across the OAuth round-trip in
  sessionStorage; PostAuthRedirect re-opens /connect/mcp with the params
  restored after the redirect lands on the root. Cleared on success.
fix(mcp): point defaults at memory.walrus.xyz + fix OAuth-reserved state param (WALM-86)
@harrymove-ctrl harrymove-ctrl requested a review from ducnmm June 4, 2026 09:06
Add MCP setup skill and protect analytics secrets
@railway-app railway-app Bot temporarily deployed to Walrus Memory / dev June 4, 2026 09:15 Inactive
@ducnmm ducnmm temporarily deployed to benchmark-dev June 4, 2026 09:15 — with GitHub Actions Inactive
@ducnmm ducnmm merged commit 0e31b4e into staging Jun 4, 2026
20 of 21 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.

3 participants