skip to Main Content

I hope you are doing fine. I was working on Oauth passport laravel, it was working fine on my previouse machine but i had to switch machines.My new machine has php 8 and my laravel project is of 7.30.0 version and my lcobucci/jwt version is 3.3.3. When i try to hit register route on postman i get the following error

LcobucciJWTSignerInvalidKeyProvided: It was not possible to parse your key, reason: in file C:UsersuserDocumentsGitHubmyprojectvendorlcobuccijwtsrcSignerInvalidKeyProvided.php on line 17

2

Answers


  1. As you can see on https://packagist.org/packages/lcobucci/jwt#3.3.3, that JWT package is officially not compatible with PHP 8. You should upgrade it to a compatible version (at least v4), or downgrade your PHP version to v7

    Login or Signup to reply.
  2. This is coming super late.
    For anyone still experiencing this, just generate a new jwt secret.

    This command will generate a new key that fits the new requirement

    php artisan jwt:secret

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search