open class-jwt-auth-public.php file and change the
register_rest_route($this->namespace, ‘token’, [
‘methods’ => ‘POST’,
‘callback’ => array($this, ‘generate_token’),
]);
to
register_rest_route($this->namespace, ‘token’, array(
‘methods’ => ‘POST’,
‘callback’ => array($this, ‘generate_token’),
));