2fa: log error on totp mismatch (#10734)

Addresses #9515

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
Abhishek Kumar 2025-09-08 14:36:22 +05:30 committed by GitHub
parent f99942cf9a
commit 6868f052de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,7 +54,9 @@ public class TotpUserTwoFactorAuthenticator extends AdapterBase implements UserT
logger.info("2FA matches user's input");
return;
}
throw new CloudTwoFactorAuthenticationException("two-factor authentication code provided is invalid");
String msg = "two-factor authentication code provided is invalid";
logger.error(msg);
throw new CloudTwoFactorAuthenticationException(msg);
}
private String get2FAKey(UserAccount userAccount) {