Merge pull request #650 from cli/oauth-localhost-callback

Avoid redirecting to `localhost` during authorization flow
This commit is contained in:
Mislav Marohnić 2020-03-16 15:08:23 +01:00 committed by GitHub
commit da4bbe398e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,7 +47,7 @@ func (oa *OAuthFlow) ObtainAccessToken() (accessToken string, err error) {
q := url.Values{}
q.Set("client_id", oa.ClientID)
q.Set("redirect_uri", fmt.Sprintf("http://localhost:%d/callback", port))
q.Set("redirect_uri", fmt.Sprintf("http://127.0.0.1:%d/callback", port))
// TODO: make scopes configurable
q.Set("scope", "repo")
q.Set("state", state)