diff --git a/Marco.Pms.Services/Controllers/AuthController.cs b/Marco.Pms.Services/Controllers/AuthController.cs index 3b69a7c..1b45eb7 100644 --- a/Marco.Pms.Services/Controllers/AuthController.cs +++ b/Marco.Pms.Services/Controllers/AuthController.cs @@ -559,9 +559,9 @@ namespace MarcoBMS.Services.Controllers { // Validate input if (string.IsNullOrWhiteSpace(verifyOTP.Email) || - string.IsNullOrWhiteSpace(verifyOTP.OPT) || - verifyOTP.OPT.Length != 4 || - !verifyOTP.OPT.All(char.IsDigit)) + string.IsNullOrWhiteSpace(verifyOTP.OTP) || + verifyOTP.OTP.Length != 4 || + !verifyOTP.OTP.All(char.IsDigit)) { _logger.LogWarning("OTP login failed - invalid input provided"); return BadRequest(ApiResponse.ErrorResponse("Invalid input", "Please provide a valid 4-digit OTP and Email", 400)); @@ -601,7 +601,7 @@ namespace MarcoBMS.Services.Controllers } // Match OTP - if (otpDetails.OTP != verifyOTP.OPT) + if (otpDetails.OTP != verifyOTP.OTP) { _logger.LogWarning("OTP login failed - incorrect OTP entered for user {UserId}", userId); return Unauthorized(ApiResponse.ErrorResponse("Invalid OTP", "OTP did not match", 401));