oauth2
oauth2 copied to clipboard
Go OAuth2
`TokenSource.Token` can make an HTTP request to obtain a new token. However, it does not accept a `Context`. This makes it difficult to pass through tracing information (mentioned in #259)...
The documentation on `NewClient` states: ```Note that if a custom *http.Client is provided via the Context it is used only for token acquisition and is not used to configure the...
**What version of Go are you using (`go version`)?** `go version go1.12.7 linux/amd64` **What operating system and processor architecture are you using?** `Linux version 4.15.0-60-generic (buildd@lgw01-amd64-030) (gcc version 7.4.0 (Ubuntu...
Hi, Fist of all, I'm not sure this is the right place to create this issue, but I think it may be helpful to other developers. ## Context My team...
For most of the scenarios when oauth2 relevant error happens, an error with prefix "oauth2:" will be raised. I just accidentally found when following case is reached https://github.com/golang/oauth2/blob/622c5d57e401754bcdaf99beee1fe0c1136fe3d9/internal/token.go#L270, the error...
Documentation of NewClient states: https://github.com/golang/oauth2/blob/9780585627b5122c8cc9c6a378ac9861507e7551/oauth2.go#L333 However, even if you pass a canceled context into NewClient, it has absolutely no effect. For example: ```go func (c *Config) NewCustomClient(ctx context.Context) *http.Client {...
Using golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 The following is a code snippet ``` func Login() { cfg := &oauth2.Config{ RedirectURL: "http://localhost:8888/callback", ClientID: os.Getenv("SPOTIFY_ID"), ClientSecret: os.Getenv("SPOTIFY_SECRET"), Endpoint: oauth2.Endpoint{ AuthURL: "https://accounts.spotify.com/authorize", TokenURL: "https://accounts.spotify.com/api/token", }, Scopes:...
There is a single use of golang.org/x/net dependency in the whole library: `ctxhttp.Do`. It can be easily inlined and the dependency dropped: https://github.com/ridge/oauth2/commit/b7f928651e695e33d6ec3cdf2213df1b5475bbbe