在配置Laravel的jwt时,登录之后报错:
Argument 3 passed to Lcobucci\JWT\Signer\Hmac::doVerify() must be an instance of Lcobucci\JWT\Signer\Key, null given, called in
经查,应该是jwt的secret没有配置。
配置jwt secret后仍然出现该错误,此时应该刷新一下laravel的缓存,运行:
php artisan config:cache
即可解决
扩展:
php artisan|grep config
config
config:cache Create a cache file for faster configuration loading
config:clear Remove the configuration cache file
php artisan|grep cache
api:cache Create a route cache file for faster route registration cache
cache:clear Flush the application cache
cache:table Create a migration for the cache database table
config:cache Create a cache file for faster configuration loading
config:clear Remove the configuration cache file
route:cache Create a route cache file for faster route registration
route:clear Remove the route cache file










网友评论