-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
oauth2: NewClient should copy settings from the context client #368
Comments
As a workaround you can do the following:
But I support the change suggested by @abeltay for the |
(cherry picked from commit 34851a6)
+1 for this change too! |
I've also noticed that the docs on the
Is there a reason that the client's fields shouldn't be modified? Specifically, I want to set the client timeout field which doesn't get copied over from the context client (see the OP's post regarding this). |
+1 on this, would be great to get some clarification. |
OAuth2 client creation currently doesn't faithfully reuse the client passed into the context.
Instead, it simply takes the Transport of the context client and puts it into a DefaultClient. This causes config settings such as timeout to be set to Default and we know default timeouts are bad #24138. This may end up to be a gotcha for anyone who sends in a context client with timeout set assuming that the timeout will be copied to the new client.
Propose to update the NewClient code as follows:
References:
#321
The text was updated successfully, but these errors were encountered: