lumen-passport icon indicating copy to clipboard operation
lumen-passport copied to clipboard

Lumen 10 with passport does not work

Open AmitSenjaliya opened this issue 1 year ago • 0 comments

I want to upgrade lumen version from ^6.0 to ^10.0. (PHP 8.3)

First error i have encounter is Call to undefined method Laravel\Lumen\Routing\Router::middleware() So i have changed AuthServiceProvider and added Passport::$registersRoutes = false; It is working and error has gone.

Now when i tried to get access token then below error found. Server error: POST /oauth/tokenresulted in a500 Internal Server Error response:\n{\n \"message\": \"Undefined property: Dusterio\\\\LumenPassport\\\\Http\\\\Controllers\\\\AccessTokenController::$jwt\"

When i have debug AccessTokenController then found $token = $this->jwt->parse($payload['access_token']); Line where jwt property undefined and not able to find parse() method.

Laravel passport AccessTokenController controller does not have $jwt property. I think this may be deprecated. What is the solution for that?

AmitSenjaliya avatar Sep 17 '24 09:09 AmitSenjaliya