Merge pull request #1830 from WorldProgrammingLtd/fix-1813

fix: log errors from login during password grant
This commit is contained in:
Márk Sági-Kazár 2020-10-13 09:21:44 +02:00 committed by GitHub
commit 9c026107e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1241,6 +1241,7 @@ func (s *Server) handlePasswordGrant(w http.ResponseWriter, r *http.Request, cli
password := q.Get("password")
identity, ok, err := passwordConnector.Login(r.Context(), parseScopes(scopes), username, password)
if err != nil {
s.logger.Errorf("Failed to login user: %v", err)
s.tokenErrHelper(w, errInvalidRequest, "Could not login user", http.StatusBadRequest)
return
}