-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
The cookie component docs needs to add a warning that if for any reason a controller method does not complete the cookie is never stored. I'm guessing cakePHP must collect all the cookies in session and then actually set them on Controller.shutdown or part of the response object?
Example case (that's taken me all day to work out what the issue was.):
SSO controller method sets cookie at beginning of method the cookie check and read methods work as expected and "show" the cookie has been written (but it hasn't really) initiate simpleSamlPhp Authenticate method which redirects session to Identity Provider to authenticate and therefore the method never "completes" and the post Controller method actions never happen and the cookie is lost and never set.
I would argue this is an actual bug of CakePHP but I also understand the authenticate process is breaking the expected CakePHP workflow which is why I'm just asking for a warning to be added to the docs so users can be aware of this and not lose hours of work debugging trying to work out why the cookie is set but not.
Please review and update the docs.