Repository navigation
Give up on a vendor after 10 seconds, not a minute - #3
Merged
Merged
Conversation
The oauth2 and oauth gems leave Net::HTTP's defaults of 60 seconds to connect and 60 to read, so a hung token endpoint held a sign-in or a refresh for a minute or more. Both strategies now default to 5 seconds connecting and 10 answering; a strategy's client_options can still set its own.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The oauth2 and oauth gems leave Net::HTTP's defaults of 60 seconds to connect and 60 to read, so a hung token endpoint could hold a sign-in or a refresh for a minute or more. OmniAuth behaves the same.
OAuth2(and so every OAuth 2 and OpenID Connect strategy) now passesconnection_opts: { request: { open_timeout: 5, timeout: 10 } }toOAuth2::Client, covering the code exchange, refresh and identity calls.OAuth1passesopen_timeout: 5, timeout: 10toOAuth::Consumer. A strategy'sclient_optionsstill win, so a vendor that needs longer can set its own. SAML, e-conomic and Adversus make no requests.A timeout already surfaces as
Unavailable. The changelog has it under Unreleased, for 0.2.1.