user-access-manager icon indicating copy to clipboard operation
user-access-manager copied to clipboard

Only the full access role can use WP-REST API calls with authentication properly

Open dukaan opened this issue 7 years ago • 1 comments

I want to use the /posts API call of Wordpress and it works properly for users with the admin role. When I am calling that endpoint with a user not having full access I am expecting to get all posts that user is allowed to see, but an empty array is returned in the response.

Is this intended? And if yes, how can I get all posts via the dedicated REST call with the plugin activated and not giving everyone the full access role?

dukaan avatar Sep 19 '18 12:09 dukaan

The problem wasn't really the plugin itself but with Apache server settings. You have to explicitly allow Authorization Headers otherwise REST calls won't use set authorization information. See https://github.com/Tmeister/wp-api-jwt-auth/issues/1

dukaan avatar Oct 18 '18 10:10 dukaan