jwt decode throws Invalid argument supplied for foreach() on php-jwt and codeignitor 4
PHP Snippet 1:
use Firebase\JWT\Key; // add the library
JWT::decode($token, new Key($key, 'HS256'));
use Firebase\JWT\Key; // add the library
JWT::decode($token, new Key($key, 'HS256'));