Why on earth would you use an iframe for your own site like that?
Sep 15, 2024
6
Level 1
Filament/Laravel into iframe
Hi guys, i'm using iframe to load my Laravel site using Filamentphp v2. I'm on localhost and It work well without iframe. I notice the cookies are created, but when login successfully the page is just reloaded (redirected to login). On config/session.php i tested:
'secure' => env('SESSION_SECURE_COOKIE',false),
'same_site' => 'Lax',
and
'secure' => env('SESSION_SECURE_COOKIE',false),
'same_site' => 'none',
SESSION_SECURE_COOKIE is set o false on .env
The login pass this step: vendor/jeffgreco13/filament-breezy/src/Http/Livewire/Auth/Login.php:
protected function attemptAuth($data)
{
// ->attempt will actually log the person in, then the response sends them to the dashboard. We need to catch the auth, show the code prompt, then log them in.
if (! Filament::auth()->attempt([
$this->loginColumn => $data[$this->loginColumn],
'password' => $data['password'],
], $data['remember'])) {
$this->addError($this->loginColumn, __('filament::login.messages.failed'));
return null;
}
event(new LoginSuccess(Filament::auth()->user()));
return app(LoginResponse::class); // success
}
Please or to participate in this conversation.