Timeline for Nonces and Ajax request to REST API and verification
Current License: CC BY-SA 4.0
3 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 2, 2020 at 21:28 | vote | accept | Rob | ||
Nov 2, 2020 at 21:27 | comment | added | Rob | Thanks Sally :) So, by using a permission_callback the nonce becomes "required" on the rest API. The permission callback is also an additional check to the cookie to ensure the user is logged in. On the login route, I set the permission_callback to 'permission_callback' => '__return_true' (as they're logging in - they won't have permissions), and set the can read / write on all other calls. I shall go and refactor now. Thank you very much for this answer - its most helpful. It means I can make some progress. | |
Nov 2, 2020 at 19:53 | history | answered | Sally CJ | CC BY-SA 4.0 |