I am working on an authentication workflow with Laravel Passport, but the laravel_session cookie changes every time, which is causing issues.
I am not sure how to fix it. And this is what I've tried so far:
In app.php:
$middleware->api([
\Illuminate\Session\Middleware\StartSession::class,
]);
In my .env file:
SESSION_DRIVER=database
SESSION_DOMAIN=site.test
SESSION_SAME_SITE=none
SESSION_SECURE_COOKIE=false
SESSION_LIFETIME=120
Has anyone managed to keep the same cookie in all api requests of a logged-in user?