SAN FRANCISCO — A federal judge has signed off on a $32.5 million settlement to resolve a class action lawsuit against Uber Technologies Inc. alleging that it wrongly charged riders extra fees based on bogus claims about its safety practices.

U.S. District Judge Jon Tigar of the Northern District of California wrote in a 15-page order that the deal fixed “deficiencies” he identified in rejecting an earlier $28.5 million settlement of the case, including by ensuring that only riders who paid Uber’s “Safe Rides Fee” will benefit from it. The earlier settlement would have paid all Uber riders during a set time period.