Skip to content

fix(oauth): publish bare-origin resource per OpenAI Apps SDK docs#74

Open
jfassio wants to merge 1 commit into
mainfrom
jfassio/resource-bare-origin
Open

fix(oauth): publish bare-origin resource per OpenAI Apps SDK docs#74
jfassio wants to merge 1 commit into
mainfrom
jfassio/resource-bare-origin

Conversation

@jfassio

@jfassio jfassio commented May 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

OpenAI's Apps SDK auth docs are explicit:

"`resource`: the canonical HTTPS identifier for your MCP server. ChatGPT sends this exact value as the `resource` query parameter during OAuth."

Their example shows the bare origin:

```json
{ "resource": "https://your-mcp.example.com", ... }
```

We've been publishing `${origin}/mcp` (e.g. `https://mcp.tako.com/mcp\`). RFC 9728 allows either form, but ChatGPT's App Review classifier appears to require the bare-origin shape. Every metadata-shape variant we tried in PR #72 was rejected with the same generic `"unsupported OAuth config type"` while our metadata otherwise matched every published spec. The bare-origin `resource` is the only material difference between our doc and the documented OpenAI example.

Change

`workers/src/oauth/handlers.ts` — one line:

```diff

  • resource: `${origin}/mcp`,
  • resource: origin,
    ```

Notes

Test plan

  • `npm run typecheck` clean
  • `npm test` — 220/220 passing (test for protected-resource metadata updated to expect bare origin)
  • Deploy to staging, then retry the App Review wizard publish flow
  • Re-test Claude.ai connect (Claude.ai uses the `resource` value from protected-resource metadata; should be unaffected since we still serve a valid resource URL)

🤖 Generated with Claude Code

OpenAI's Apps SDK auth docs are explicit: "ChatGPT sends this exact
value as the `resource` query parameter during OAuth." Their example
shows the bare origin (`https://your-mcp.example.com`), not a path-
suffixed URL.

We were publishing `${origin}/mcp`. RFC 9728 allows either form, but
ChatGPT's App Review classifier appears to require the bare-origin
shape — every other variant has been rejected with "unsupported OAuth
config type" while our metadata otherwise matches every published
spec.

Single-character change. Mirrors the docs example exactly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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