OAuthClientProvider: no supported way to override endpoints or customize authorization state generation
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 65/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
- 領域
- api, authentication, backend
調査の方向性
Look at the OAuthClientProvider class in the codebase, likely in a file like oauth_client.py. Examine the _perform_authorization_code_grant method for state generation and the endpoint resolution logic. The work involves adding new optional parameters or hooks, then updating the flow to use them. Test by creating a subclass that overrides the new hook and supplies custom endpoints.
索引モデルが issue の本文から書いたものです。
説明
Initial Checks
- I confirm that I'm using the newest release of my line (verified on
mainand 2.2.0) - I confirm that I searched for my issue in the issues before opening this one (searched "custom oauth endpoints", "generate_auth_state", "state hook")
Release line
v2 (v1 shares the code)
Description
Two extensibility gaps in OAuthClientProvider for host applications that manage OAuth at scale (many servers, multi-tenant callbacks):
-
Endpoint override. The endpoints used by the flow are only ever taken from discovery metadata or hard-coded fallbacks. A host that already knows the correct endpoints (admin-configured connectors, servers with broken or absent RFC 8414 metadata) has no supported way to supply them — subclassing private methods is the only route today. Proposal: an optional
OAuthEndpointsvalue (authorization/token/registration endpoints) accepted by the provider and taking precedence over discovery. -
State generation hook.
_perform_authorization_code_granthard-codesstate = secrets.token_urlsafe(32). A host that routes many callbacks through one shared redirect endpoint needs to bind thestatevalue to its own session/tenant (e.g. a signed payload) while keeping the SDK's CSRF check. Proposal: an overridablegenerate_auth_state()hook defaulting to the current behavior.
Both are additive, no behavior change for existing users. We run both in production and can PR them — happy to be assigned.
🤖 Generated with Claude Code
- 主要言語
- Python
- スター
- 24.3k
- フォーク
- 4k
- 平均マージ
- 1日 16時間
- マージ済み PR(30日)
- 25
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modelcontextprotocol/python-sdk のほかの issue
-
v1 v2
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
modelcontextprotocol/python-sdk#3578 · コメント 1 件 ·
-
v1 v2
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
modelcontextprotocol/python-sdk#3573 · コメント 2 件 ·
-
v2
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
modelcontextprotocol/python-sdk#3566 ·
-
v1 v2
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
modelcontextprotocol/python-sdk#3546 · コメント 5 件 ·
-
v1 v2
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
modelcontextprotocol/python-sdk#3545 · コメント 2 件 ·
modelcontextprotocol/python-sdk の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
stephrobert/dsoxlab#238 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
sublimehq/package_control#1780 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
nwg-piotr/nwg-displays#145 ·