Skip to content

Exempt /auth/oauth/ from platform CSRF (MCP connector DCR/token) - #14

Merged
thorwhalen merged 1 commit into
mainfrom
feat/oauth-csrf-exempt
Jun 27, 2026
Merged

Exempt /auth/oauth/ from platform CSRF (MCP connector DCR/token)#14
thorwhalen merged 1 commit into
mainfrom
feat/oauth-csrf-exempt

Conversation

@thorwhalen

Copy link
Copy Markdown
Member

Claude.ai's DCR + token POSTs are cookieless and were 403'ing on the platform CSRF check. Exempt the /auth/oauth/ prefix (register/token are PKCE+client-protected; consent POST carries its own signed token). Gated on oauth_server.enabled. Verified against the live trufflepig_mcp connector.

Claude.ai's dynamic client registration and token exchange are cookieless
machine-to-machine POSTs that can't carry the platform's double-submit CSRF
token — they were 403'ing. /auth/oauth/register + /token are protected by PKCE
+ client validation, and the consent POST carries its own signed token, so the
whole /auth/oauth/ prefix is safe to exempt (gated on oauth_server.enabled).

Claude-Session: https://claude.ai/code/session_0154TnwYASjN1u1Hw97JQ2vd
@thorwhalen
thorwhalen merged commit 0fb2800 into main Jun 27, 2026
12 checks passed
@thorwhalen
thorwhalen deleted the feat/oauth-csrf-exempt branch June 27, 2026 12:09
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.

1 participant