You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove the unused timeout parameter from OAuthClientProvider
OAuthContext.timeout was assigned in the constructor but never read
anywhere, so the parameter has never bounded anything since the OAuth
client was added. Drop it from OAuthClientProvider, the deprecated
RFC7523OAuthClientProvider, and OAuthContext rather than keep a knob
that silently does nothing.
Copy file name to clipboardExpand all lines: docs/client/oauth-clients.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,7 @@ The first time `Client` sends a request, the server answers `401`. The provider
83
83
84
84
After that it is quiet. Tokens come out of storage, an expired access token is refreshed with the refresh token, and only when none of that works does it run the flow again.
85
85
86
-
You wrote none of it. Three keyword arguments remain (`timeout`, `client_metadata_url` and `validate_resource_url`), and this file needs none of them. `client_metadata_url` is the one worth knowing about; it gets its own section below.
86
+
You wrote none of it. Two keyword arguments remain (`client_metadata_url` and `validate_resource_url`), and this file needs neither. `client_metadata_url` is the one worth knowing about; it gets its own section below.
Forward the `iss` query parameter from the redirect so the validation can run: omitting it makes the flow fail with `OAuthFlowError` against servers that advertise `authorization_response_iss_parameter_supported`, and silently skips the check for servers that send `iss` without advertising it.
1956
1956
1957
+
### `timeout` parameter removed from `OAuthClientProvider`
1958
+
1959
+
`OAuthClientProvider` (and the deprecated `RFC7523OAuthClientProvider`) no longer accept a `timeout` argument, and `OAuthContext.timeout` is gone. The value was stored but never read, so it never bounded anything — the only open-ended waits in the flow are your own `redirect_handler` and `callback_handler`.
If you need to bound how long the flow waits for the user to complete authorization, apply the timeout inside your `callback_handler`, e.g. `with anyio.fail_after(120): ...`.
1974
+
1957
1975
### Client rejects authorization server metadata with a mismatched `issuer`
1958
1976
1959
1977
During OAuth discovery, `OAuthClientProvider` now validates that the authorization server
0 commit comments