• When i’m using rest api with user validate passing the information username and password

    $user = wp_authenticate($username’,$Password’);

    if password wrong throwing 500 internal server error instead of need to return appropriate message.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Why are you authenticating users? The API either does not need authentication, or that authentication already be done through auth cookie or a specific API Authentication plugin. I’m not saying you are wrong in what you are doing, just trying to understand the context.

    Any related errors in the error log?

    The code you posted has quotes that do not belong. I’m assuming your actual code does not have these.

Viewing 1 replies (of 1 total)

The topic ‘Wp rest api user validate’ is closed to new replies.