Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit da4bbe3

Browse files
authored
Merge pull request cli#650 from cli/oauth-localhost-callback
Avoid redirecting to `localhost` during authorization flow
2 parents 58f6bef + 71d3696 commit da4bbe3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

auth/oauth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (oa *OAuthFlow) ObtainAccessToken() (accessToken string, err error) {
4747

4848
q := url.Values{}
4949
q.Set("client_id", oa.ClientID)
50-
q.Set("redirect_uri", fmt.Sprintf("http://localhost:%d/callback", port))
50+
q.Set("redirect_uri", fmt.Sprintf("http://127.0.0.1:%d/callback", port))
5151
// TODO: make scopes configurable
5252
q.Set("scope", "repo")
5353
q.Set("state", state)

0 commit comments

Comments
 (0)