27 lines
687 B
PHP
27 lines
687 B
PHP
<?php
|
|
|
|
namespace App\Auth;
|
|
|
|
use Illuminate\Auth\SessionGuard;
|
|
|
|
class DockerSessionGuard extends SessionGuard
|
|
{
|
|
/**
|
|
* Update the session with the given ID.
|
|
*
|
|
* @param string $id
|
|
* @return void
|
|
*/
|
|
protected function updateSession($id)
|
|
{
|
|
$this->session->put($this->getName(), $id);
|
|
|
|
// In Docker, skip session migration to avoid session persistence issues
|
|
// Only regenerate the CSRF token, don't migrate the session ID
|
|
$this->session->regenerateToken();
|
|
|
|
// Note: We intentionally skip session->migrate() here for Docker compatibility
|
|
// In production, you should use the standard SessionGuard
|
|
}
|
|
}
|