PDA

View Full Version : Saving session across domains


RisingGlow
07-22-2014, 02:16 AM
I'm looking for a way to save a vbulletin session across domains.
The issue I have is my first domain, site1.com runs everything on the forum.
I want to include another domain site2.com that handles custom forum pages (like a shop plugin, arcade, etc) which are all just plugins to vbulletin.
the real URL to the shop plugin is something like site1.com/shop (and everything else following it for further pages)
but I want site2.com to basically be site1.com/shop

If it makes any difference, the registration/login will still be site1.com on the shop/arcade section, it's just if you'd like to participate in site2.com, you'd need to login at site1.com. If that makes any sense..

kh99
07-23-2014, 10:05 AM
You might try experimenting with putting the sessionid on the urls (which is done automatically if a user has cookies disabled). There's a function $vbulletin->session->set_session_visibility($invisible) which is called in init.php to show or hide the sessionid depending on a few conditions.

I haven't tried this and I'm not sure why sessionids are normally hidden, except that it makes the urls more readable, so maybe there's an issue with doing this that I don't understand.

Dead Eddie
07-23-2014, 11:12 PM
I haven't tried this and I'm not sure why sessionids are normally hidden, except that it makes the urls more readable, so maybe there's an issue with doing this that I don't understand.

Person A posts a link that includes his session ID
Person B follows that link while Person A's session is still active
Person B takes over Person A's session.

I used to work for an ecommerce company whose shopping cart/session ID was passed by a URL parameter. When a link went viral, it was not pretty.