Make it more go

Co-authored-by: Till <2353100+S7evinK@users.noreply.github.com>
This commit is contained in:
KuhnChris 2023-07-03 16:48:44 +02:00 committed by GitHub
parent eb51b1d24e
commit 532cdd1f45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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