Morgan & Morgan and Clifford Law Offices filed a class action against Allstate Insurance Co. for allegedly unlawfully collecting and selling data from more than 45 million consumers to raise premiums.

The consumer class action comes on the heels of Attorney General Ken Paxton's enforcement action against Allstate and its subsidiary Arity LLC under the Texas Data Privacy and Security Act, which was filed Monday in Montgomery County, Texas.

The Texas state action and the class action both allege Allstate created software on third-party apps to collect data on consumers' driving behavior without their knowledge. In addition, the data was sold to other insurance companies and used for Allstate's underwriting purposes to raise prices, the suits alleged.