For years U.S. officials have warned that TikTok poses a national-security risk because of its owner, China-based ByteDance.