WP-API / Basic-Auth

Basic Authentication handler for the JSON API, used for development and debugging purposes
767 stars 285 forks source link

User not logged in #64

Open digitxo opened 4 years ago

digitxo commented 4 years ago

{ "code": "rest_not_logged_in", "message": "You are not currently logged in.", "data": { "status": 401 } }

I get this error when I try to access https://balancingpawsdogtraining.com/wp-json/wp/v2/users/me using Basic AUth.... help please.

constructivesoftware commented 4 years ago

Did you get anywhere with this issue? I'm having the same problem.

MarcoPNS commented 4 years ago

I guess you use PHP in CGI-mode. Here you need to add a RedirectRule to the top of your Wordpress .htaccess file:

RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
boiss-dev commented 3 years ago

https://github.com/WP-API/Basic-Auth/issues/35#issuecomment-244001216