Perhaps create a global middleware that checks if the user is authenticated and if they have the session data, if not it sets the session data.
Jul 9, 2016
2
Level 4
Restore session data after remember me auth
Normally when a user logs into my application I set some session variables in the AuthController->authenticated() method.
The problem that I'm having is when a user has the remember me option enabled and the session expires, Laravel will re-authenticate the user but it will miss setting the session data making my application to crash since i need the data from the session.
Where is the best place to put this session logic so that it trigger in both cases (normal auth and remember me) ? I was thinking on listening to an auth event. but I'm not very sure.
Thanks in advance.
Level 50
1 like
Please or to participate in this conversation.