I am using laravel/passport for api authentication Today My old access token isn't working and When i try to generate new access token then i got
Implicit conversion of keys from strings is deprecated. Please use InMemory or LocalFileReference classes. {"exception":"[object] (ErrorException(code: 0): Implicit conversion of keys from strings is deprecated. Please use InMemory or LocalFileReference classes.
Anyone have any solution?
lcobucci/jwt:3.4
has this problem, you can downgrade to 3.3, composer require lcobucci/jwt:3.3
can resolve it.
Or, In config\jwt.php
file Change :
'jwt' => Tymon\JWTAuth\Providers\JWT\Lcobucci::class,
to
'jwt' => Tymon\JWTAuth\Providers\JWT\Namshi::class,
As said before, lcobucci/jwt:3.4
is causing this issue, which can be solved by downgrading to 3.3.*.
However, if you have declared something like this:
"lcobucci/jwt": "^3.3.1",
you need to remove the ^
because v3.4 would still be downloaded. Please keep in mind, using a newer version might be better because of bugfixes and other stuff, so make sure to update the respective logic to work with a newer version of the dependecy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With