jonathan-dejong / simple-jwt-authentication

Extends the WP REST API using JSON Web Tokens Authentication as an authentication method.
GNU General Public License v3.0
87 stars 25 forks source link

Strange error on authentication. #21

Closed harlet closed 6 years ago

harlet commented 6 years ago

Hi there!

If I access the Url (GET) /wp-json/simple-jwt-authentication/v1/token on a WPEngine live site; I get:

{
  "code": "jwt_auth_bad_auth_header",
  "message": "Authorization header malformed.",
  "data": {
    "status": 403
  }
}

I say is strange because searching thru the plugin's code I found that, the error is returned in a validate_token function.

Even if a do a POST request, I have the same error.

jonathan-dejong commented 6 years ago

Hi @harlet

Have you checked out the wiki about WPengine? SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

https://github.com/jonathan-dejong/simple-jwt-authentication/wiki/Documentation#wpengine

harlet commented 6 years ago

Already had that setup. The problem was the cross-origin.

Thank you!