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

Auth fails? #87

Closed
PanMan opened this issue Nov 27, 2014 · 8 comments
Closed

Auth fails? #87

PanMan opened this issue Nov 27, 2014 · 8 comments
Milestone

Comments

@PanMan
Copy link
Contributor

PanMan commented Nov 27, 2014

Auth seems to fail, even when explicityly setting it in the call:

wp.users().auth("USER","PASS").me(); 

gives an empty object, while calling wp-json/users/me with basic auth with curl returns my user info.

@kadamwhite
Copy link
Collaborator

Thanks for the report! I've been traveling for the US holiday, but I'll be able to take a look at this over the weekend (and should have a resolution for prior issues too).=

@PanMan
Copy link
Contributor Author

PanMan commented Dec 2, 2014

@kadamwhite any progress?
I'm suspecting the basic auth headers between this and curl differ slightly, but not 100% sure yet

@kadamwhite
Copy link
Collaborator

@PanManAms I am not able to replicate; wp.users().auth('USER', 'PASS').me() returns the expected user object. What version (plugin repo version or github commit SHA) of the API and basic auth plugin are you using?

@kadamwhite kadamwhite modified the milestone: 0.3.1 Dec 3, 2014
@PanMan
Copy link
Contributor Author

PanMan commented Dec 4, 2014

It seemed to have something to do with the server settings on the wordpress end. This now works..

@PanMan PanMan closed this as completed Dec 4, 2014
@kadamwhite
Copy link
Collaborator

Great, glad to hear it! I have a fix for #84 as well, I'm just testing it before merging and releasing 0.3.1.

@sebastienbarre
Copy link

Which server settings, if I may ask? I'm having issues to authenticate...

@kadamwhite
Copy link
Collaborator

@sebastienbarre what sort of trouble are you running into? Can you let us know the version of the WP-API plugin and basic Auth plugin you are using, and what server you are using? (E.g. Apache vs Nginx?)

@sebastienbarre
Copy link

Thanks for the quick reply @kadamwhite.
The issue comes from WP-API/Basic-Auth, which needs to be patched to support PHP in CGI/FastCGI mode. A PR was submitted back in March, this would be greatly helpful.

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

3 participants