Support » Plugin: JWT Authentication for WP REST API » JWT for WordPress Multisite?

  • I have a working version on single site.

    The access to the main site in WP multisite is OK,
    but I get refusal on other sites in my WP multisite.

    ..."jwt_auth_bad_iss","message":"The iss do not match with this server" ...

    I have chekced the user name & passwords – they are OK.

    Any help, idea is appreciated

    Thanks

    • This topic was modified 1 year, 2 months ago by mulli.bahr.
    • This topic was modified 1 year, 2 months ago by mulli.bahr.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Does it support multisite?

    I need ……………….

    RewriteEngine on
    RewriteCond %{HTTP:Authorization} ^(.*)
    RewriteRule ^(.*) – [E=HTTP_AUTHORIZATION:%1]

    SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1

    but there is ……………………….

    RewriteBase /
    RewriteRule ^index\.php$ – [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ – [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    cvillaronga

    (@cvillaronga)

    Hi,

    The plugin works perfectly on multisite configurations, users must belong to the list of users of the sub-site to be able to use the REST there, however, if you require all your registered users in a sub-site to be able to use of the resources of another sub-site, then it will be necessary to make a couple of changes in your file class-jwt-auth-public.php where it says get_bloginfo ('url') should be replaced by network_site_url() lines 142 and 278.

    Hope this helps you,

    Hi,

    The plugin works in multisite, but if it’s a multisite in sub directory, the POST request from this site return this error :
    {“code”:”rest_cannot_create”,”message”:”Sorry, you are not allowed to create posts as this user.”,”data”:{“status”:401}}

    If we do the same POST request from an othe site or postman it working.

    Someone have a idea for repair this ?

    Bests regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘JWT for WordPress Multisite?’ is closed to new replies.