fix(login): check for error before automatic idp redirect (#7891)

* fix(login): check for error before automatic idp redirect

* hide next button on login page if username password is not enabled
This commit is contained in:
Livio Spring
2024-05-03 07:57:24 +00:00
committed by GitHub
parent 900894161f
commit d177b82d2d
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -95,7 +95,7 @@ func (l *Login) renderLogin(w http.ResponseWriter, r *http.Request, authReq *dom
if err != nil {
errID, errMessage = l.getErrorMessage(r, err)
}
if singleIDPAllowed(authReq) {
if err == nil && singleIDPAllowed(authReq) {
l.handleIDP(w, r, authReq, authReq.AllowedExternalIDPs[0].IDPConfigID)
return
}