jwt-auth icon indicating copy to clipboard operation
jwt-auth copied to clipboard

Device parameter is not parsed from request body if sent with 'content-type: json'.

Open sun opened this issue 3 years ago • 0 comments

Discovered during #33

Problem

  • When sending REST parameters as a JSON object together with a Content-Type: json instead of multipart/form-data, then the device parameter is not handled; i.e., the device is not registered and does not appear in the user account.

Cause

  • The code directly accesses $_POST['device'] instead of retrieving the request parameter from WP_REST_Request.

sun avatar Mar 09 '22 09:03 sun