# ChatGPT MCP OAuth callback fails with a pre-registered confidential client

> Source: <https://discuss.huggingface.co/t/chatgpt-mcp-oauth-callback-fails-with-a-pre-registered-confidential-client/193031#post_1>
> Published: 2026-12-02 20:34:16+00:00

**Recommendation:** 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.
More in the playbook "Securing agents and AI tools": <https://wpnews.pro/playbooks/agent-security>

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.

A 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.

ChatGPT 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.
