Skip to content
Advertisement

Jwt Authentication error Argument 3 passed to LcobucciJWTSignerHmac::doVerify()

I’m working on a project to learn laravel, I saw a couple of tutorials to use jwt auth in this. It was working good but now is show an error not always but I don’t know why. this is it:

Argument 3 passed to LcobucciJWTSignerHmac::doVerify() must be an instance of LcobucciJWTSignerKey, null given, called in C:xampphtdocsinmobiliariavendorlcobuccijwtsrcSignerBaseSigner.php on line 42

Sometimes it works but not another. so I don’t know what can I do. I tried with

  1. php artisan cache:clear
  2. php artisan config:clear
  3. php artisan jwt:secret

but the problem still there, sometimes i get good answer from server(200) but the most part of then al bad (500).

Screenshots

enter image description here

enter image description here

Advertisement

Answer

Here’s complete snippet

php artisan key:generate
php artisan jwt:secret
php artisan cache:clear
php artisan config:clear

Before run above commands make sure there is install jwt package, than check its config file name jwt.php in config folder.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement