Beispiel #1
0
        public IActionResult VerifyOTP([FromQuery] string username, string otp)
        {
            OTPService service = new OTPService(configuration.GetConnectionString("MAF"));

            try
            {
                if (!service.VerifyOTP(username, otp))
                {
                    return(BadRequest());
                }
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }

            return(Ok());
        }