'Laravel Session gets cleared after a redirect (IE only)
Need some assistance on this annoying issue that happens only in IE, Edge and in an iframe I have code as below which sets the session values as below
session()->put('is_user_logged', true);
session()->put('user_data', $user_data);
Session::save();
After a redirection and when I do a var_dump(session()->get('user_data')), its always NULL. Before the redirection it is NOT NULL.
Searched the internet and tried the following solutions as well, but no joy. :(
Changed the 'cookie' => 'laravel_session' to be 'cookie' => 'laravelsession' in config/session.php
Moved the "StartSession" from $middlewareGroups to $middleware in kernel.php
Verified if 'domain' => env('SESSION_DOMAIN', null) has NULL in config/session.php
If anyone can shed some light on this would be highly appreciated.
Note that this is happening ONLY on IE. Works fine on Firefox and Chrome
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
