fix: log errors from login during password grant

Issues: #1813
Signed-off-by: Alastair Houghton <alastair@alastairs-place.net>
This commit is contained in:
Tom Quarendon 2020-10-04 05:55:08 +01:00 committed by Alastair Houghton
parent d4c3a3505d
commit 4da93e75fc
1 changed files with 1 additions and 0 deletions

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
}