Loan Secured - Loans - Mortgages - 0 Credit Cards - Mortgage

PDA

View Full Version : Unified Login


Help Desk
Oct 22nd 2004, 12:27 pm
How would you go about having 2 domains (on 2 seperate servers) that have not only the same login information, but also allow one to go from one server to the next without having to log back in?

daboss
Oct 23rd 2004, 3:01 am
The only way I can think of is to have a cookie containing the login info at the browser.

Ozz
Oct 25th 2004, 10:21 pm
I'm not shure if the cookie domain settings (if you are using php) can help. If you set a cookie in domain A it is not available in domain B... as daboss said you can refer the user data using the URL..... or a not so clean idea is to generate your own cookies and copy the file to the other server using cron or something. That way (if you keep both versions of the file exact) you will know who is online in the other site.

aspcoder
Dec 3rd 2004, 3:48 am
You need single database table and store login information for both server/sites.

mushroom
Dec 3rd 2004, 8:17 am
You need single database table and store login information for both server/sites.
That would work.
But if you don't want to do or can't do it that way and if you are using php
1. Modify the links from site A to site B for logged in users to include the user name (?name=user_name).
2. Use " if ( substr_count($_SERVER["HTTP_REFERER"],"url_of_site_A")==1)" to auto login the user on site B " if valid user "
3. Do the same in reverse.