Symptoms
When enabling Two-Factor Authentication in the WHM interface, you are presented with a failure to load and parse errors relating to the tfa_userda.json file.
Description
When enabling Two-Factor Authentication, the following error is brought up and Two-Factor is not enabled.
Workaround
Verify your JSON file is valid. This can be done with the json_pp library if it is loaded or through python directly.
json_pp < /var/cpanel/authn/twofactor_auth/tfa_userdata.json
python -m json.tool /var/cpanel/authn/twofactor_auth/tfa_userdata.json
If you get an error, verify the contents of the file are only "{}"