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

jwt_auth_no_auth_header for valid tokens can happen #60

Open
autotel opened this issue Mar 30, 2020 · 1 comment
Open

jwt_auth_no_auth_header for valid tokens can happen #60

autotel opened this issue Mar 30, 2020 · 1 comment

Comments

@autotel
Copy link

autotel commented Mar 30, 2020

I ran into this issue and found someone who solved it by changing the library code. I came here to check whether he had added an issue, and it seems not.
The problem in question and the solution is detailed by that author:
https://stackoverflow.com/questions/44322866/jwt-auth-no-auth-header-error-on-validating-wordpress-rest-api-jwt-token

@jonathan-dejong
Copy link
Owner

Hmm alright I see.. So essentially add a secondary check for the Authorization header key if none is found with the default HTTP_AUTHORIZATION..

Seems a valid approach tbh. You could actually also just set the SIMPLE_JWT_AUTHENTICATION_HEADER_NAME global yourself to Authorization and it'd work. In your wp-config.php:

define( ' SIMPLE_JWT_AUTHENTICATION_HEADER_NAME', 'Authorization' );

I believe that would work but I haven't tried it myself.

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

No branches or pull requests

2 participants