From 92e68af46f7745ad710f8a7093420b42b580e332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Wed, 27 May 2020 15:08:21 +0200 Subject: [PATCH] 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 --- auth/oauth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth/oauth.go b/auth/oauth.go index 3f9d9ddc4..5e286443e 100644 --- a/auth/oauth.go +++ b/auth/oauth.go @@ -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 }