From 8770c25b62b6d64d1c8c4488854e214e9fe193e5 Mon Sep 17 00:00:00 2001 From: Tobias Weber Date: Mon, 17 Feb 2025 22:28:12 +0100 Subject: [PATCH] Allow workaround if no browser can be opened In debug mode, print out full authorizationURL to provide workaround in circumstances where no window-server is available (hence no browser can be opened), as is the case when connect via ssh to headless systems. The workaround is to call ``stackit --verbosity debug auth login`` Copy the link from the debug output and paste it to an available browser. --- internal/pkg/auth/user_login.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/pkg/auth/user_login.go b/internal/pkg/auth/user_login.go index fd9829348..b8a706a51 100644 --- a/internal/pkg/auth/user_login.go +++ b/internal/pkg/auth/user_login.go @@ -232,7 +232,7 @@ func AuthorizeUser(p *print.Printer, isReauthentication bool) error { } }) - p.Debug(print.DebugLevel, "opening browser for authentication") + p.Debug(print.DebugLevel, "opening browser for authentication: %s", authorizationURL) p.Debug(print.DebugLevel, "using authentication server on %s", idpWellKnownConfig.Issuer) p.Debug(print.DebugLevel, "using client ID %s for authentication ", idpClientID)