Boris N
Boris N

Reputation: 857

Laravel Passport gets 'It was not possible to parse your key, reason: ""' error after upgrade to PHP8.0

My app works on Laravel 8 with laravel/passport 10.0.1. After upgrading php version on dev server from 7.4 to 8.0, I'm getting It was not possible to parse your key, reason: "" error (without any message from openssl_error_string).

Any ideas how to fix it?

Upvotes: 7

Views: 14229

Answers (5)

Rehman Ahmad
Rehman Ahmad

Reputation: 1

I had this same error. I solved this problem via update library by composer.

composer update

Upvotes: 0

hossein
hossein

Reputation: 1

I had this same error. I solved this problem via update library by composer.

composer update

to resolve this issue.

Upvotes: 0

Juan Pablo Pola Demoro
Juan Pablo Pola Demoro

Reputation: 153

I suffered the same error this week but I resolved it by upgrading all to PHP 8.0

My composer.json

...
"require": {
    "php": "ˆ8.0",
}...
"config": {
   ...
   "platform": {
        "php": "Your PHP version"
   }
}

It's probably late for you but I hope it's useful for someone else

Upvotes: 1

This prob means your KEYS are incorrect or the env is not finding them.

If a file you need to use the PATH

JWT_PUBLIC_KEY_PATH=
JWT_PUBLIC_KEY_PATH=

Upvotes: -1

Boris N
Boris N

Reputation: 857

OK, after brief investigation, I found that you have to update laravel/passport to 10.1.0 (the newest at the moment of posting) to make it work with php8.0.

Upvotes: 22

Related Questions