diff --git a/internal/ai/oauth.go b/internal/ai/oauth.go index 75eb7be..0d4f930 100644 --- a/internal/ai/oauth.go +++ b/internal/ai/oauth.go @@ -70,12 +70,12 @@ func (o *OAuthManager) StartLogin(openURL func(string) error) (<-chan error, err } // Start a local HTTP server on a random port for the callback - listener, err := net.Listen("tcp", "127.0.0.1:0") + listener, err := net.Listen("tcp", "localhost:0") if err != nil { return nil, fmt.Errorf("listen for callback: %w", err) } port := listener.Addr().(*net.TCPAddr).Port - redirectURI := fmt.Sprintf("http://127.0.0.1:%d/callback", port) + redirectURI := fmt.Sprintf("http://localhost:%d/callback", port) done := make(chan error, 1)