Sharing cookies between two URLs, one forum instance.

Phases

Active member
#1
I hope this can be easily done and someone is willing to help me.

I have two URLs, both pointing to the same forum instance. I have bought two licenses to accommodate this.

It works fine except that if you go from one to the other you have to log in repeatedly. I would like to not have to do this and cookies go across the board.

(ha, see what I did there? Across the board!)

Is this easily done? Any advice appreciated.
Thanks!

http://teatimeshow.com/forum
http://androiduncensored.com/forum
 

Mike

XenForo developer
Staff member
#2
You can't share cookies between 2 entirely unrelated domains (without developing a complex system to support it, that is).
 

Jake Bunce

XenForo moderator
Staff member
#3
Browser cookies cannot cross between different domain names. You will have to login for each domain name. This is a limitation of cookies and would be a problem no matter what forum software you use.
 
#5
Like the others said, cookies are set on a per domain basis. You will be unable to set the cookie for androiduncensored.com from teatimeshow.com.

However, you might be able to come up with something like this:
  • user logs in at Site A
  • site sets their cookie at Site A
  • site redirects user to Site B
  • site sets their cookie at Site B
  • site redirects user back to site A
2 things to think about:
  • You'd probably need to also log out of both sites when the user clicks "logout"
  • Any information that is stored in the cookie after the user logs in could cause inconsistencies between the 2 domains
Unless it's critical, I wouldn't bother with it.
 

Phases

Active member
#6
I guess I was hoping you could pass a session key back and forth rather than rely on a cookie stored on the users local machine.

...this really bums me out. Not critical, but a terrible annoyance as users come to the forum from one site - discover the second as intended - go check it out, then come back with the forum button in the navbar there.
 
Top