Hi I think I've found a bug/issue - or at least this is what is happening for my Debian Jessie server.
I'm running Webmin 1.821 and Virtualmin 5.05 GPL.
When I enabled Two Factor Authentication and scan the QR code in Google Authenticator all seems ok.
But then when I log out and try and log back in I just get the error: "Two-factor authentication failed: Incorrect OTP code"
I then have to go in via SSH and disable OTP/2FA.
Any help appreciated to get this enabled or fixed.