美文网首页
Argument 3 passed to Lcobucci\JW

Argument 3 passed to Lcobucci\JW

作者: 如梦又似幻 | 来源:发表于2019-12-16 18:13 被阅读0次

在配置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

相关文章

网友评论

      本文标题:Argument 3 passed to Lcobucci\JW

      本文链接:https://www.haomeiwen.com/subject/taudnctx.html