Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic Authentication for the JSON API only be used for development and testing #22

Open
4n70w4 opened this issue Apr 9, 2019 · 3 comments

Comments

@4n70w4
Copy link

4n70w4 commented Apr 9, 2019

https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/#authentication-plugins

https://github.com/WP-API/Basic-Auth

How can use a more secure authentication protocol for production?

@mowshon
Copy link

mowshon commented Jun 24, 2019

@str
Copy link

str commented Sep 2, 2020

Is basic authentication working? I tried testing a request to /wp-json/wp/v2/users/me but got the error:

( ! ) Fatal error: Uncaught GuzzleHttp\Exception\ClientException: 
Client error: `GET http://[...]/wp-json/wp/v2/users/me` 
resulted in a 
`401 Unauthorized` 
response: 
{"code":"rest_not_logged_in","message":"You are not currently logged in.","data":{"status":401}}
 in [...]/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 111

@angelxmoreno
Copy link

@str are you using a user password or application password? AFAIK, this library would need an application password. Take a look at this: https://wprestclient.readthedocs.io/en/latest/misc/application-password/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants