Browse Source

fix: log errors from login during password grant

Issues: #1813
Signed-off-by: Alastair Houghton <alastair@alastairs-place.net>
pull/1830/head
Tom Quarendon 6 years ago committed by Alastair Houghton
parent
commit
4da93e75fc
  1. 1
      server/handlers.go

1
server/handlers.go

@ -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
}

Loading…
Cancel
Save