Tmeister / wp-api-jwt-auth

A simple plugin to add JSON Web Token (JWT) Authentication to WP REST API
GNU General Public License v2.0
549 stars 159 forks source link

rest_no_route error message #218

Open R3ll36 opened 3 years ago

R3ll36 commented 3 years ago

Hi, can somebody please help me with this error?

This is my .htaccess file

<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1] SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 </IfModule>

So, when i try to login i get the "rest_no_route" error message and in the console i get: Before Request >>> {"adapter": [Function xhrAdapter], "data": {"password": "prolocoappp", "username": "proloco"}, "headers": {"common": {"Accept": "application/json, text/plain, */*"}, "delete": {}, "get": {}, "head": {}, "patch": {"Content-Type": "application/x-www-form-urlencoded"}, "post": {"Content-Type": "application/x-www-form-urlencoded"}, "put": {"Content-Type": "application/x-www-form-urlencoded"}}, "maxBodyLength": -1, "maxContentLength": -1, "method": "post", "timeout": 0, "transformRequest": [[Function transformRequest]], "transformResponse": [[Function transformResponse]], "url": "https://prolocoragogna.it/prolocoapp/index.php/wp-json/jwt-auth/v1/token", "validateStatus": [Function validateStatus], "xsrfCookieName": "XSRF-TOKEN", "xsrfHeaderName": "X-XSRF-TOKEN"} [Tue Apr 20 2021 10:33:45.827] LOG Error Response >>> [Error: Request failed with status code 404]