Skip to content

Auth fails? #87

Closed
Closed

Description

@PanMan

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.

Activity

  1. kadamwhite commented on Nov 27, 2014

    @kadamwhite
    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).=

  2. PanMan commented on Dec 2, 2014

    @PanMan
    ContributorAuthor

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

  3. kadamwhite commented on Dec 2, 2014

    @kadamwhite
    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?

  4. modified the milestone: 0.3.1 on Dec 3, 2014
  5. PanMan commented on Dec 4, 2014

    @PanMan
    ContributorAuthor

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

  6. kadamwhite commented on Dec 4, 2014

    @kadamwhite
    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.

  7. sebastienbarre commented on Jul 8, 2016

    @sebastienbarre

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

  8. kadamwhite commented on Jul 8, 2016

    @kadamwhite
    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?)

  9. sebastienbarre commented on Jul 8, 2016

    @sebastienbarre

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions