From 532cdd1f456115ed253014dc21856f3210f434f8 Mon Sep 17 00:00:00 2001 From: KuhnChris Date: Mon, 3 Jul 2023 16:48:44 +0200 Subject: [PATCH] Make it more `go` Co-authored-by: Till <2353100+S7evinK@users.noreply.github.com> --- clientapi/routing/login.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/clientapi/routing/login.go b/clientapi/routing/login.go index a304ed96d..0f55c8816 100644 --- a/clientapi/routing/login.go +++ b/clientapi/routing/login.go @@ -47,9 +47,8 @@ func Login( cfg *config.ClientAPI, ) util.JSONResponse { if req.Method == http.MethodGet { - var loginFlows []flow - loginFlows = []flow{{Type: authtypes.LoginTypePassword}} - if len(cfg.Derived.ApplicationServices) == 0 { + loginFlows := []flow{{Type: authtypes.LoginTypePassword}} + if len(cfg.Derived.ApplicationServices) > 0 { loginFlows = append(loginFlows, flow{Type: authtypes.LoginTypeApplicationService}) } // TODO: support other forms of login, depending on config options