tags:

views:

192

answers:

3

i have 2 different websites. i want a feature that when a user logs in to site A then he should be automatically logged in to site B. please give me some concepts for that. (eg:- when anyone logs into gmail, he is automatically logged into orkut)

+2  A: 

Start using openID http://openid.net/

Pentium10
A: 

If you control both websites, then you can ask website1 if the user is logged in, and if he is, log him in on website2. Login state is usually stored in cookies, but website2 cannot read website1's cookie, so website2 cannot see if the user is logged into website1 without asking website1.

Marius
Unless the cookies are set via a domain that both sites share.
Blair McMillan
A: 

If both sites are under your control, you can have website1 tag any links pointing to website2 with an ecrypted token of some sort. The exact contents would be up to you, but whenever a page is requested from website2 with that token set, it can be decrypted and contain whatever information is needed to say that "hey, this user logged in successfully on website1, consider them accepted on website2"

Marc B