{"slug": "chatgpt-mcp-oauth-callback-fails-with-a-pre-registered-confidential-client", "title": "ChatGPT MCP OAuth callback fails with a pre-registered confidential client", "summary": "A developer running FastMCP 4.0.6 is seeking help after ChatGPT returned \"Failed to finish app OAuth callback\" when connecting a remote MCP server configured as a pre-registered confidential client using client_secret_post, S256 PKCE, no dynamic registration and the stable callback with RFC 9207 issuer identification. A bounded gateway and backend log search found no correlated requests, so the developer cannot determine whether ChatGPT rejected the callback before the token exchange or attempted a token request; the pinned upstream source uses issuer_url for both metadata and the success redirect, and its default consent page lacks form-action. The developer is asking for redacted discovery fields or local comparisons that would distinguish the two failure cases without replaying production.", "body_md": "Has anyone successfully connected a remote MCP server to ChatGPT using a pre-registered confidential client with client_secret_post, S256 PKCE, no dynamic registration and the stable callback with RFC 9207 issuer identification? We’re looking for a minimal public reference implementation or advice from someone who has deployed this combination.\n\nA FastMCP 4.0.6 OAuthProxy subclass handles the fixed ChatGPT client separately from upstream Google OAuth. Stock metadata advertised none; corrected metadata advertised client_secret_post and S256 and omitted dynamic registration. A preflight recorded matching issuer values across discovery documents. The pinned upstream source uses issuer_url for both metadata and the success redirect, and its default consent page lacks form-action. We do not have the actual callback iss or a browser trace for the failed attempt.\n\nChatGPT reported “Failed to finish app OAuth callback.” A bounded gateway/backend log search found no correlated requests, so we cannot tell whether the client rejected the callback before exchange or attempted a token request. We found an Entra reference using a per-app callback, but are looking for the stable callback specifically. Which redacted discovery fields or local comparisons would you recommend to distinguish these cases without replaying production? Thanks.", "url": "https://wpnews.pro/news/chatgpt-mcp-oauth-callback-fails-with-a-pre-registered-confidential-client", "canonical_source": "https://discuss.huggingface.co/t/chatgpt-mcp-oauth-callback-fails-with-a-pre-registered-confidential-client/193031#post_1", "published_at": "2026-12-02 20:34:16+00:00", "updated_at": "2026-12-02 20:47:39.064535+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "developer-tools"], "entities": ["ChatGPT", "FastMCP 4.0.6", "OpenAI", "Google", "Entra", "OAuthProxy"], "also_reported_by": [], "takeaway": "When ChatGPT's MCP OAuth callback fails with no correlated backend requests, the failure likely occurs before token exchange; compare redacted discovery metadata (issuer values, client_secret_post, S256, absence of dynamic registration) and check whether the consent page's missing form-action blocks", "recommendation": {"advice": "Log the callback's iss parameter and browser trace before the token exchange, and add form-action to the consent page, to tell client-side rejection from a failed token request.", "playbook": "agent-security", "playbook_url": "https://wpnews.pro/playbooks/agent-security"}, "alternates": {"html": "https://wpnews.pro/news/chatgpt-mcp-oauth-callback-fails-with-a-pre-registered-confidential-client", "markdown": "https://wpnews.pro/news/chatgpt-mcp-oauth-callback-fails-with-a-pre-registered-confidential-client.md", "text": "https://wpnews.pro/news/chatgpt-mcp-oauth-callback-fails-with-a-pre-registered-confidential-client.txt", "jsonld": "https://wpnews.pro/news/chatgpt-mcp-oauth-callback-fails-with-a-pre-registered-confidential-client.jsonld"}}