diff --git a/client/ui/client_ui.go b/client/ui/client_ui.go index 219c1c26910..d90156f56d5 100644 --- a/client/ui/client_ui.go +++ b/client/ui/client_ui.go @@ -232,12 +232,17 @@ func (s *serviceClient) getSettingsForm() *widget.Form { return } - _, err = client.Login(s.ctx, &proto.LoginRequest{ + loginRequest := proto.LoginRequest{ ManagementUrl: s.iMngURL.Text, AdminURL: s.iAdminURL.Text, - OptionalPreSharedKey: &s.iPreSharedKey.Text, IsLinuxDesktopClient: runtime.GOOS == "linux", - }) + } + + if s.iPreSharedKey.Text != "**********" { + loginRequest.OptionalPreSharedKey = &s.iPreSharedKey.Text + } + + _, err = client.Login(s.ctx, &loginRequest) if err != nil { log.Errorf("login to management URL: %v", err) return