diff --git a/gateway/src/main/java/org/georchestra/gateway/app/GeorchestraGatewayApplication.java b/gateway/src/main/java/org/georchestra/gateway/app/GeorchestraGatewayApplication.java index 555f90d1..1088db1f 100644 --- a/gateway/src/main/java/org/georchestra/gateway/app/GeorchestraGatewayApplication.java +++ b/gateway/src/main/java/org/georchestra/gateway/app/GeorchestraGatewayApplication.java @@ -121,6 +121,11 @@ public String loginPage(@RequestParam Map allRequestParams, Mode oauth2LoginLinks.put("/oauth2/authorization/" + k, clientName); }); } + + if (oauth2LoginLinks.size() == 1 && !ldapEnabled ) { + return "redirect:"+oauth2LoginLinks.keySet().stream().findFirst().get(); + } + mdl.addAttribute("header_enabled", headerEnabled); mdl.addAttribute("header_script", headerScript); mdl.addAttribute("ldapEnabled", ldapEnabled);