Closed ramdcet closed 1 year ago
Hi @ramdcet,
I just tried it on my side, and all seems to work.
Have you been able to call other endpoints? For example,
http://{{HOST}}/?rest_route=/wp/v2/posts&JWT={JWT}
One common problem might be that the Authorization
header might be missing when you make the request.
So, please make sure that you have the following in your .htaccess file:
RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
Another simple way would be to change the header name for "Authorization" to something else in the simple-jwt-login plugin settings (General -> Get JWT token from -> Header). For example, you can try "Auth". After that, please make a request with the "Auth" header instead of "Authorization".
Let me know if it works after you try these examples.
Best regards, Nicu.
Thanks for update
@ramdcet, is this issue resolved for you?
Hi, I have successfully integrated it with login & register functonality. i want to use it with woocommerce endpoint, when i called the woocommerce end point then it showing error “{ “code”: “woocommerce_rest_cannot_view”, “message”: “Sorry, you cannot list resources.”, “data”: { “status”: 403 } }” . I have enabled the setting from “All WordPress endpoints checks for JWT authentication”. I tried to pass the JWT Token as header/ as authorization but this is not working. Any hepl?
![Uploading image.png…]()