diff --git a/legacy/src/Command/Auth/BrowserLoginCommand.php b/legacy/src/Command/Auth/BrowserLoginCommand.php index 5c667c062..48b20649b 100644 --- a/legacy/src/Command/Auth/BrowserLoginCommand.php +++ b/legacy/src/Command/Auth/BrowserLoginCommand.php @@ -124,8 +124,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int } throw $e; } - $localAddress = '127.0.0.1:' . $port; - $localUrl = 'http://' . $localAddress; + // Bind to 0.0.0.0 to allow access from outside the container/localhost + $localAddress = '0.0.0.0:' . $port; + // Use 127.0.0.1 for the URL shown to users + $localUrl = 'http://127.0.0.1:' . $port; // Then create the document root for the local server. This needs to be // outside the CLI itself (since the CLI may be run as a Phar).