-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featureauthIssues and PRs related to Authentication / OAuthIssues and PRs related to Authentication / OAuth
Description
python-sdk/src/mcp/client/auth.py
Line 432 in 40acbc5
| if response.status_code != 200: |
MCP servers such as https://supabase.com/docs/guides/getting-started/mcp will return 201 on successful token exchange. The current logic breaks the flow even after the exchange has been successful on the resource side - something as simple as the following fixes throwing an unnecessary error here.
...
if response.status_code != 200 and response.status_code != 201:
raise OAuthTokenError(f"Token exchange failed: {response.status_code}")
....
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featureauthIssues and PRs related to Authentication / OAuthIssues and PRs related to Authentication / OAuth