Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • @contactjavas I’m curious, the docs mention passing the username and password as a parameter – isn’t that normally considered a query arg or am I misunderstanding?

    To generate token, submit a POST request to this endpoint. With username and password as the parameters.

    Your mention of including it in the body helped me with my issue. Am I misunderstanding how this works or is there more to it?

    @sy007 I followed this guide to generate by token: https://ww.wp.xz.cn/support/topic/403-jwt_auth_no_auth_header-with-nginx-kinsta/

    Afterwards, I used Postman to make an update to my post where I didn’t have issues. The curl I ran was this – replace TOKEN with your token, mysite.tld with your actual site, and the post ID with the post you’re updating.

    
    curl -L 'https://mysite.tld/wp-json/wp/v2/posts/1' -X POST -H 'content-type: application/json' -H 'Authorization: Bearer TOKEN' --data-raw '{"title":"Updated title"}'
    

    This was a test update, but what are you trying to update and what’s the error?

    • This reply was modified 5 years, 3 months ago by sleuthbuilder.

    I’d also like to know what an appropriate Nginx rule would be. I currently have this in my Nginx configuration and had no issues generating a token using Postman.

    
    #JWT Auth plugin
    if ($http_HTTP_JWT_AUTHORIZATION ~ "^(.*)"){
    	set $rule_0 1;
    }
    if ($rule_0 = "1"){
    	set $http_HTTP_JWT_AUTHORIZATION %1;
    }
    

    This is another Nginx rule that was suggested by a colleague of mine.

    
    if ($http_authorization ~ "^(.*)"){
    	set $rule_0 1;
    }
    if ($rule_0 = "1"){
    	set $http_authorization %1;
    }
    

    @rawkus2g hmm, do you have a search feature in the program you’re using?
    I’m using phpMyAdmin and have a “Search” at the top after I select my database.
    https://imgur.com/a/GJyPsGw is what it looks like when I have the search box open.
    https://imgur.com/a/KJO8jf7 is the search I did. I hope these help!

    I also did not mention it, but I ensured WooCommerce was the only active plugin and even changed the theme.

    @rawkus2g

    I can’t guarantee it will work but it’s worth a try and has worked so far on a test site I’m using.
    If you have access to phpMyAdmin (or something similar) you can run this query for your database after selecting your database name. You will also need to replace wp_options with what you have set in your table_prefix in wp-config.php.

    Example, if you have raw_ in your table_prefix, you’ll have to run this query instead (I replaced wp_ with raw_).

    
    SELECT * FROM raw_options WHERE option_name = 'wc_remote_inbox_notifications_specs'
    

    I hope this helps!

    I’ve seen this issue on 4.7, 4.8 and 4.9 – rolling back the plugin version doesn’t work either.

    One thing that I am seeing when running a trace on a request like this is that there’s a request to 192.0.66.5 IP and an update to the table wp_options using an INSERT INTO statement.

    This option is constantly updated wc_remote_inbox_notifications_specs in a never-ending loop.

    It seems that setting this option’s “autoload” setting to “no” fixes product updates.
    Updating Woo’s database doesn’t help either.

    I used this query to pull the option from the database:
    SELECT * FROM wp_options WHERE option_name = 'wc_remote_inbox_notifications_specs'

    Then I updated the “autoload” setting to “no” from “yes”.

    One thing that I am seeing when running a trace on a request like this is that there’s a request to 192.0.66.5 IP and an update to the table wp_options using an INSERT INTO statement.

    This option is constantly updated wc_remote_inbox_notifications_specs in a never-ending loop.

    It seems that setting this option’s “autoload” setting to “no” fixes product updates.
    Updating Woo’s database doesn’t help either.

    I used this query to pull the option from the database:
    SELECT * FROM wp_options WHERE option_name = 'wc_remote_inbox_notifications_specs'

    Then I updated the “autoload” setting to “no” from “yes”.

    • This reply was modified 5 years, 4 months ago by sleuthbuilder.
Viewing 7 replies - 1 through 7 (of 7 total)