1

I have two domains pointing to same server, what i am trying to do is when i log in into the application using domainOne.com the session is maintained for that domain , if i try to access the application from other domain domainTwo.com the session is not there.

I want the same session values in both the domains,

I have PHP application [Yii Framework Application], and the requirement is, one third party application wants part of my application content that needs to be authenticated. I authenticate the content using SSO(Single Sign On[JWT]) and pointed their domain to my content(which needs to be shared) using this way, i am able to login using their's(Third party's) domain but when i access the same section using my original domain the session is not there (No Session when using My domain).

What i want is, when i log in using their domain and access the content from my domain it should show me as logged in user

Conditions -

domainTwo.com/someContent - Logged in using this

domainOne.com/someContent - Session is not here

and vice versa

P.S someContent is in my server only.

Please can anyone help? Thanks in advance..!

edit - Requirement is the client dont want iframes, please suggest methods which dont use iframes.

Avneesh
  • 149
  • 1
  • 1
  • 7
  • You could set session/login cookie via iFrame on other server as well. So use would be logged in on both servers. – Jurik May 05 '14 at 14:16
  • @Jurik - i didn't you, means what you are saying is fetch content to the other domain using Iframes? – Avneesh May 05 '14 at 14:30
  • This [link](http://stackoverflow.com/questions/14611545/preserving-session-variables-across-different-domains) or [this](http://stackoverflow.com/questions/1339984/cross-domain-php-sessions) or [this](https://www.sitepen.com/blog/2008/07/30/protected-cross-domain-authentication-with-javascript/) might help you. – Jurik May 05 '14 at 14:32

0 Answers0