Initial commit
This commit is contained in:
26
app/Auth/DockerSessionGuard.php
Normal file
26
app/Auth/DockerSessionGuard.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user