By David Uberti

Lawyers for TikTok are pushing to settle a lawsuit in Illinois alleging the video-sharing app improperly collects data from its users, many of them underage, as its Chinese parent company closes in on a deal with Oracle Corp.

President Trump issued an executive order in early August giving parent company ByteDance Ltd. 45 days to sell TikTok's U.S. operations to an American company or face a ban. The deadline put more pressure on the company to resolve the suit before a potential sale, and attorneys have been discussing a settlement in recent weeks, according to court filings and three lawyers involved in the case.

A deal could help TikTok avoid a potentially long and expensive case exploring whether it unlawfully records minors' personal information, including by scanning their faces, to bolster development of artificial-intelligence technologies in China and feed a recommendation engine seen as key to the app. The algorithm has become a sticking point in sale talks despite little understanding beyond TikTok of how it works.

Whether TikTok's algorithm will be included in any deal couldn't be learned. A representative for Oracle declined to comment on the pending deal.

"It's next to impossible to know what any given company is doing on the back end," said Shuman Ghosemajumder, head of AI at F5 Networks Inc. Upstarts like TikTok have more flexibility to innovate how they collect and analyze information than older social-media platforms, which tend to stick with tried and true methods, he said.

"There's an advantage that they have on that front, which is that you don't get stuck in an old mind-set based on what old data used to do," Mr. Ghosemajumder said.

TikTok's data practices have come under increasing legal and political scrutiny since the Trump administration's executive order in August. Just days earlier, about 20 class-action lawsuits on behalf of young users in states including California and Illinois merged into a single case in the U.S. District Court for the Northern District of Illinois.

Many of the suits, filed on behalf of users as young as 8 years old, allege that surreptitious use of facial-recognition technology and other biometric data was a key ingredient to TikTok's secret sauce. The complaints claim that TikTok sends user data to Chinese servers and quietly collects "voiceprints" and "face geometry scans" to recommend content based on users' age, race and physical attractiveness.

Collecting users' biometric data without consent carries the risk of huge financial penalties under Illinois's strict biometric privacy law, said Matthew Kugler, a Northwestern University law professor. Facebook Inc. agreed this year to a settlement of at least $550 million in a class-action lawsuit accusing it of wrongfully deploying facial-recognition tools on Illinois residents.

If TikTok is using such technology on users without proper notice, Mr. Kugler said, "they're potentially facing a lot of liability." He added that the Illinois statute doesn't differentiate between underage and adult users.

Lawyers for TikTok said in court filings that the app doesn't collect biometric data such as voice recordings and face scans. Company representatives have previously said that TikTok doesn't share user data with the Chinese government. The company couldn't be reached for comment Monday.

A settlement could include a pot of money for the plaintiffs and potential changes to TikTok's practices, according to three lawyers involved in the case. It could be finalized this fall, they said.

--Angus Loten contributed to this article.

Write to David Uberti at david.uberti@wsj.com