OAuth callback does not validate the RFC 9207 iss parameter

Open
#365 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
69/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript

Research direction

Read src/routes/auth-routes.ts and src/auth/oauth-client.ts, then trace how discovery metadata and the authorization callback are handled. Check the OAuth route tests for issuer metadata and callback validation. Done means the callback compares iss with the discovered issuer, requires it when metadata says it is supported, and rejects a mismatch before making the token request.

Written by the indexing model from the issue text.

Description

2026-07-28 makes RFC 9207 mandatory for clients (authorization.md: "MCP clients MUST apply the validation in RFC9207 Section 2.4 before transmitting the authorization code to any token endpoint", SEP-2468). The OAuth helper routes do not record the authorization server's issuer from discovery and /oauth/callback ignores iss: with authorization_response_iss_parameter_supported: true in the metadata, /oauth/callback?code=C&state=<valid>&iss=https://other.example still redeems the code (src/routes/auth-routes.ts, src/auth/oauth-client.ts).

The callback should compare iss with the recorded issuer (and require it when the metadata says it is supported) before the token request.

🤖 Generated with Claude Code

Dominant language
TypeScript
Stars
63
Forks
16
Avg merge
1d 15h
Merged PRs (30d)
56

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from platformatic/mcp

All issues in platformatic/mcp

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.