mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-21 13:04:18 +02:00
fix: accept HTTP 200 status in OAuth pre-flight check (#1874)
This commit is contained in:
parent
7e4aaa8696
commit
0ee263a1c6
1 changed files with 2 additions and 2 deletions
|
|
@ -318,8 +318,8 @@ class OAuth(OAuthClientProvider):
|
|||
"OAuth client not found - cached credentials may be stale"
|
||||
)
|
||||
|
||||
# For any non-redirect response, something is wrong
|
||||
if response.status_code not in (302, 303, 307, 308):
|
||||
# OAuth typically returns redirects, but some providers return 200 with HTML login pages
|
||||
if response.status_code not in (200, 302, 303, 307, 308):
|
||||
raise RuntimeError(
|
||||
f"Unexpected authorization response: {response.status_code}"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue