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
The main motivation for this change is that TokenSource doesn't
support contexts. We would like to access values from an http.Request
context when we are doing the request that generates a new token.
At this stage, this change is just a POC. I'd like to gather reviews
about this approach. If this approach is OK, I'll probably improve docs
and add proper testing.
Fixesgolang/go#33131
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
It does reproduce with the latest version of golang.org/x/oauth2. I guess this is an issue about this subrepository.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://play.golang.org/p/iOdgycJZA4f
This example requires facebook credentials, but the bug does reproduce with any credential source.
What did you expect to see?
There are two requests, one for retrieving an oauth2 token, and the other to get the actual URL.
I expected the two requests to see the same context values, which would generate an output like
What did you see instead?
The context value is not passed to the first request.
The text was updated successfully, but these errors were encountered: