PDA

View Full Version : Cross-domain auth using vB tables?


Mister Internet
01-23-2003, 02:33 PM
Hello All,

I am currently working on a prototype PHP/MySQL web app that is completely unrelated to vB. However, this site I'm creating is to be a sort of "sister site" to the largest forums out there for our hobby... my app is a user-centric database-driven app, and I'm curious about a couple of things...

1. Am I able to use the vBulletin tables from another domain? For example, my site is www.sistersite.com, and I'm trying to use the user tables from www.parentsite.com. Two different domain names. Is this possible, and does anyone have any quick code or can you point me to a place that does?

2. I want to set my site up so that it senses whether or not the users at www.parentsite.com have set "always log me in" (you know, the cookie thing), and it automatically logs the into my site as well. Can cookies, or more specifically, can vB's cookies be shared cross-domain in this fashion? What I'm proposing amounts to www.sistersite.com checking a cookie from www.parentsite.com, and I don't believe that's possible... any other suggestions for this kind of scenario?

Registration at www.parentsite.com is MANDATORY for using my site, so I have no issues with registration or authentication mechanisms... I will be taking it for granted. What I'm more concerned about is being able to share this info cross-domain, and whether or not it's even possible. I wish to retain my own domain and webspace for this app, and If I have to go ahead and keep authentication separately for this site I will. Thanks!

...tom

Xenon
01-23-2003, 04:25 PM
well it is possible, but it's not easy, i currently don't know a already finisherd hack for 1

Mister Internet
01-23-2003, 05:30 PM
Originally posted by Xenon
well it is possible, but it's not easy, i currently don't know a already finisherd hack for 1

I'm fairly confident I can figure out the meat of the coding, I was more curious about the nature of the problem... i.e. what exactly would have to be accomplished for vB to relinquish information in this manner. Technical issues, condsiderations, potential security problems, etc etc... thanks!

...tom

Xenon
01-24-2003, 11:50 AM
well, you have to edit the db_mysql.php file and check if the working table is user, if it is it, connect to the other server and get the data from there.

but it would be hard with join queries, i don't know how you'd write a workaround for them...