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
{{ message }}
Repository navigation
Bug: the App installation token request ignores the client timeout #331
GitHub(..., timeout=...) is not applied to the installation-token request that AppInstallationAuthStrategy's auth flow sends. That request goes out with no timeout extension, so httpcore reads no timeout and the request can wait forever. Only the API request that follows gets the configured timeout.
The cause appears to be that the auth flow yields a fresh httpx.Request (auth/app.py, the token exchange in sync_auth_flow / async_auth_flow). httpx sets the timeout extension only on the request passed to send(), not on requests an Auth flow yields, so httpcore sees None.
Reproduction
githubkit 0.15.1 (the token-exchange code is unchanged in 0.16.1), httpx 0.28.1, Python 3.14:
The token request carries the same timeout as the client. Otherwise the first call on every App-installation client, and each token refresh, can hang indefinitely.
Possible fix
Set request.extensions["timeout"] from the client's configured timeout on each request the auth flow yields, in both the sync and async flows.
Activity
yanyongyu commentedon Oct 14, 2026
Maybe we should use
client.build_requestto construct the exchange request. httpx handles the timeout in the extensions. https://github.com/encode/httpx/blob/b5addb64f0161ff6bfe94c124ef76f6a1fba5254/httpx/_client.py#L340-L389Also we can copy the options from the incoming request object.