Skip to content

Commit d3feae2

Browse files
fallback login strategy when no valid IDP found
1 parent e9a8b42 commit d3feae2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

restapi/user_login.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ func getLoginDetailsResponse(params authApi.LoginDetailParams, openIDProviders o
230230
}
231231

232232
if len(openIDProviders) > 0 && len(redirectRules) == 0 {
233-
return nil, ErrorWithContext(ctx, errors.New(403, "no reachable or configured IDP found, login not allowed"), ErrOauth2Provider)
233+
loginStrategy = models.LoginDetailsLoginStrategyForm
234+
// No IDP configured fallback to username/password
234235
}
235236

236237
loginDetails = &models.LoginDetails{

0 commit comments

Comments
 (0)