Laravel Passport: Session store not set on request. at .../vendor/laravel/framework/src/Illuminate/Http/Request.php:560)
Hello everyone, I've been having this problem for a couple of days.
I am using Laravel Passport in my application to act as an Oauth provider. I have the "Session store not set on request" error, but only on the first request the client make to my application.
I inspect the request coming to my server (apache) and I can see the POST request to /oauth/token but the status code is 500 and in laravel.log the error message I have is "Session store is not configured under request". The strange thing comes later, because if I refresh the client's web page, suddenly it works and the next POST request to /oauth/token in my app returns 200 and I can log in to the client's website with my app's credentials. After that everything works fine, I can log out and log back in to the client website without any problems.
I Already Try disabling multiple routes/middlewares in my app, clear cache etc. But after several tests it is always the same, on the first request from the client website to my application I get error 500 with session store not configured on demand, but after that everything works fine.
The application uses Laravel 10. It was created in mid-2021, so it has been updated from Laravel 7.
Any help or suggestion is welcome
Please or to participate in this conversation.