Skip to content

Commit

Permalink
fix: log errors from login during password grant
Browse files Browse the repository at this point in the history
Issues: #1813
Signed-off-by: Alastair Houghton <[email protected]>
  • Loading branch information
tomqwpl authored and al45tair committed Oct 7, 2020
1 parent d4c3a35 commit 4da93e7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 4da93e7

Please sign in to comment.