diff --git a/api/blueprints/common/otp/timed_otp.py b/api/blueprints/common/otp/timed_otp.py index 5c7e6d0..0421296 100644 --- a/api/blueprints/common/otp/timed_otp.py +++ b/api/blueprints/common/otp/timed_otp.py @@ -163,14 +163,11 @@ async def generate_otp( # Either the session must be valid, or # the IP address requesting the service must be whitelisted: - if ( - kwargs.get("session_info") is None and - inbound_headers["Remote-IP"] not in current_app.whitelisted_ips - ): + if kwargs.get("session_info") is None: return ResponseModel( status_code = StatusCodes.FAILED, http_code = HttpCodes.UNAUTHORIZED, - message = "Invalid session and/or bad IP addr." + message = "Invalid session." ) # Get the user's info: @@ -304,14 +301,11 @@ async def verify_otp( # Either the session must be valid, or # the IP address requesting the service must be whitelisted: - if ( - kwargs.get("session_info") is None and - inbound_headers["Remote-IP"] not in current_app.whitelisted_ips - ): + if kwargs.get("session_info") is None: return ResponseModel( status_code = StatusCodes.FAILED, http_code = HttpCodes.UNAUTHORIZED, - message = "Invalid session and/or bad IP addr." + message = "Invalid session." ) # Get the user's info: