Hi all.
I'm exploring laravel to see if I want to use it for a new project. I'm in the process of going through the documentation and writing a simple demo app to get acquainted. While creating a user management interface, I noticed some strange behavior. I created a user controller to handle user edit actions, and a POST routes for edit actions with 'auth' filters to ensure you can only access those routes when authenticated. That all worked fine, until I left my browser opened one day to my user edit form, and tried deleting a user with my session expired. I thought this was good chance to test out the auth filter. As expected, it redirected me to the login form. However, instead of authenticating I closed out the browser, relaunched, authenticated, and started browsing around my site. When I listed the users I noticed my that user I deleted (while not authenticated) was deleted.
I did further testing to confirm this. What seems to be happening is there must be some session remembrance of the action I did while NOT authenticated, such that when I did authenticate (regardless of what page I'm accessing), that action then processes as soon as I log in.
I can understand this as a desirable thing if you are accessing a page when your session expires, so that you get redirected to login first, and then back, but that is not what I'm talking about there. I'm performing a request while not authenticated, aborting, and then starting a whole new request for another part of the site, authenticating, and then my aborted action get's processed. Hopefully that makes sense.
Does anyone have an idea for what I can do to correct this behavior without writing some custom filters? Surely this isn't intended default behavior. Just to point out, I'm doing my best to use out of the box features as much as possible for the demo in order to learn the framework.
Thanks!
Adam