Saturday, March 4, 2017

StartSession middleware inside middleware stack prevents using cookie as session driver

If I want to access to authenticated user data inside Exceptions\Handler.php (in order to store records of which users produce exceptions) I need to do a little change inside app\Kernel.php file.

(as I explain in this answer: Accessing Auth in Exceptions\Handler.php)

When I make the modifications that I expose in that answer, it works well; but it prevents me from using cookie as session driver (since when using it, the sessions are not maintained; there are deleted when logged in).

There is any solution to this? Why does this happen?



via tomloprod

Advertisement