fix: perform auth server metadata discovery fallbacks on any 4xx (#1193)
Some checks failed
Main branch checks / checks (push) Has been cancelled
Some checks failed
Main branch checks / checks (push) Has been cancelled
This commit is contained in:
parent
6d2e6d442d
commit
35777b9811
1 changed files with 105 additions and 2 deletions
|
|
@ -526,8 +526,8 @@ class OAuthClientProvider(httpx.Auth):
|
|||
break
|
||||
except ValidationError:
|
||||
continue
|
||||
elif oauth_metadata_response.status_code != 404:
|
||||
break # Non-404 error, stop trying
|
||||
elif oauth_metadata_response.status_code < 400 or oauth_metadata_response.status_code >= 500:
|
||||
break # Non-4XX error, stop trying
|
||||
|
||||
# Step 3: Register client if needed
|
||||
registration_request = await self._register_client()
|
||||
|
|
|
|||
Loading…
Reference in a new issue