Skip to content

Incompatibility with Woocommerce #65

@cesar-alamilla

Description

@cesar-alamilla

Hi, first of all thank you for this plugin it works fine.

However I found a trouble using it along with Woocommerce plugin.

Due to the kind of host of my WP I need to edit the .htaccess file adding:
RewriteEngine on
RewriteCond %{HTTP:Authorization} ^(.)
RewriteRule ^(.
) - [E=HTTP_AUTHORIZATION:%1]
and
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

In order to access the namespace /simple-jwt-authentication/v1 with my Bearer token.
This work fine, actually I can validate, refresh and revoke tokens successfully.

The problem comes when I try to access the endpoints enable by Woocommerce in which I need a Basic token to access the API.
All the Woocommerce endpoints return me an error code "jwt_auth_bad_auth_header" with a message: "Authorization header malformed."

If I disable the plugin or removes the lines added to the .htaccess the woocommerce plugin return to work as usual.

I do a little Google search about this and I found this maybe is an inherited problem from the plugin of Tmeister. Also I found a little workaround, this is not the best solution however it allow me to have simple-jwt-authentication working alongside woocommerce:

https://github.com/Tmeister/wp-api-jwt-auth/issues/48#issuecomment-503291246

This a temporary solution however it would be fine if a definitive is found for this.

Greetings!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions