Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

_handle_token_response should accept 201 responses #1502

Copy link
Copy link
@jnjpng

Description

@jnjpng
Issue body actions

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

No one assigned

    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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.