forgot duo and push notifications for force2factor #7045

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
si458
2025-05-21 00:14:47 +01:00
parent 45ec199839
commit a8ed3464e4
3 changed files with 8 additions and 4 deletions

View File

@@ -2368,6 +2368,8 @@
if (userinfo == null) return -1;
var authFactorCount = 0;
if (userinfo.otpsecret == 1) { authFactorCount++; } // Authenticator time factor
if (userinfo.otpduo == 1) { authFactorCount++; } // Duo factor
if (userinfo.otpdev == 1) { authFactorCount++; } // Push authentication factor
if (userinfo.otphkeys > 0) { authFactorCount += userinfo.otphkeys; } // FIDO hardware factor
if ((features & 0x00800000) && (userinfo.otpekey == 1)) { authFactorCount++; } // EMail factor
if ((features & 0x02000000) && (features & 0x04000000) && (userinfo.phone != null)) { authFactorCount++; } // SMS factor