Losing sessions with window.open and cakephp redirection in PHP with cakephp

Posted by vsecades on Stack Overflow See other posts from Stack Overflow or by vsecades
Published on 2010-04-04T14:19:59Z Indexed on 2010/04/04 14:23 UTC
Read the original article Hit count: 772

Filed under:
|
|
|

Hi guys,

Ok, here goes a very strange problem...

Our team is using cakephp to develop a large application. Everything session related is working properly so far. The only issues we've had so far are related to iframes and opening windows in other subdomains. I'll explain:

  1. User opens up site A and logs into it, creation a User in a session. Cookies are set, everything works as expected.
  2. The user clicks a link that opens up Site B via Javascript. When they go to that site, they are automatically logged in by a backend mechanism and infrastructure. Site B is a subdomain of Site A.
  3. On that site there is another mechanism to go back to the first page (a link rather) that logs them back in to site A. The fun part about this whole process is the following, and that on step 3, when we click on the link, the session on Site A has been lost. I know it's lost because it is forcing login again.

I am a bit lost, as the rest of the application that work with AJAX and uses iframes and stuff works flawlessly, just this one item does not work as one would expect. Any assistance would be appreciated.

Cheers, Valentin

© Stack Overflow or respective owner

Related posts about cakephp

Related posts about sessions