diff --git a/device_model.php b/device_model.php index d880cdb..f178ec3 100644 --- a/device_model.php +++ b/device_model.php @@ -165,7 +165,8 @@ public function get_auth_request() { return array("success"=>false, "message"=>"Unable to handle authentication requests without redis"); } if ($device_auth = $this->redis->get("device:auth:request")) { - return array_merge(array("success"=>true, json_decode($device_auth))); + $device_auth = json_decode($device_auth); + return array_merge(array("success"=>true, "ip"=>$device_auth->ip)); } else { return array("success"=>true, "message"=>"No authentication request registered"); }