diff --git a/api/auth/loginOTP.cfm b/api/auth/loginOTP.cfm index 21eada2..138fdbe 100644 --- a/api/auth/loginOTP.cfm +++ b/api/auth/loginOTP.cfm @@ -45,7 +45,8 @@ function generateOTP() { try { data = readJsonBody(); - phone = structKeyExists(data, "phone") ? normalizePhone(data.phone) : ""; + phone = structKeyExists(data, "Phone") ? normalizePhone(data.Phone) + : structKeyExists(data, "phone") ? normalizePhone(data.phone) : ""; if (len(phone) != 10) { apiAbort({ "OK": false, "ERROR": "invalid_phone", "MESSAGE": "Please enter a valid 10-digit phone number" });