According to the docs, you can disable the two-factor check for a particular user. Did you also try
sudo -u www-data php occ twofactor:enable <username>
According to the docs, you can disable the two-factor check for a particular user. Did you also try
sudo -u www-data php occ twofactor:enable <username>