Fix referring to loopback interface in OAuth flow
Avoids the error when `localhost` was resolved to something else other
than `127.0.0.1`:
listen tcp 192.168.1.*:0: bind: can't assign requested address
This commit is contained in:
parent
465869a5ab
commit
92e68af46f
1 changed files with 1 additions and 1 deletions
|
|
@ -41,7 +41,7 @@ func (oa *OAuthFlow) ObtainAccessToken() (accessToken string, err error) {
|
|||
state, _ := randomString(20)
|
||||
|
||||
code := ""
|
||||
listener, err := net.Listen("tcp", "localhost:0")
|
||||
listener, err := net.Listen("tcp4", "127.0.0.1:0")
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue