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
560 stars 161 forks source link

Incompatible with Wordpress 6 #240

Closed troke12 closed 2 years ago

troke12 commented 2 years ago
Stack trace:
#0 /var/www/wp-api/wp-content/plugins/jwt-authentication-for-wp-rest-api/public/class-jwt-auth-public.php(169): Firebase\JWT\JWT::encode()
#1 /var/www/wp-api/wp-includes/rest-api/class-wp-rest-server.php(1143): Jwt_Auth_Public->generate_token()
#2 /var/www/wp-api/wp-includes/rest-api/class-wp-rest-server.php(990): WP_REST_Server->respond_to_request()
#3 /var/www/wp-api/wp-includes/rest-api/class-wp-rest-server.php(414): WP_REST_Server->dispatch()
#4 /var/www/wp-api/wp-includes/rest-api.php(394): WP_REST_Server->serve_request()
#5 /var/www/wp-api/wp-includes/class-wp-hook.php(307): rest_api_loaded()
#6" while reading response header from upstream, client: 127.0.0.1, server: wp-api.domain.com, request: "POST /wp-json/jwt-auth/v1/token HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "wp-api.domain.com"

so, i can't get the token when i'm using wordpress 6, after downgrading it's successfuly get the token without any error

TonyGravagno commented 2 years ago

I'm running 6.0.2 and I can get a token.

Tmeister commented 2 years ago

I'm also running on > 6.0, and everything works as expected.

Please, if you have more info, reopen the issue.