diff --git a/backend/core/src/Core.Infrastructure/Compliance/TOTPGenerator/TOTPGenerator.cs b/backend/core/src/Core.Infrastructure/Compliance/TOTPGenerator/TOTPGenerator.cs index bc6ace4..69d19f3 100644 --- a/backend/core/src/Core.Infrastructure/Compliance/TOTPGenerator/TOTPGenerator.cs +++ b/backend/core/src/Core.Infrastructure/Compliance/TOTPGenerator/TOTPGenerator.cs @@ -38,10 +38,12 @@ public bool VerifyOTP(string otpKey, string otpCode) var keyBytes = Base32Encoding.ToBytes(otpKey); // Create a TOTP generator with the key and time step - var totp = new Totp(keyBytes, step: 30); + var totp = new Totp(keyBytes, step: 120); // Verify the OTP code - return totp.VerifyTotp(otpCode, out _, VerificationWindow.RfcSpecifiedNetworkDelay); + bool isValid = totp.VerifyTotp(otpCode, out long timeStepMatched, VerificationWindow.RfcSpecifiedNetworkDelay); + + return isValid; } catch {