Click here to Skip to main content
15,890,670 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am working on two sites that are in different domain but both are interconnected and talking to same database and CMS. Now I want once user logs in to 1st site, it should automatically login to 2nd site. What will be the best way to achieve this considering both the domains are different(though in same server). Is it best to use curl ?
Posted

1 solution

Won't claim this is the best way, but I've used dynamically created links to pass users from one site to the other - such links passing a GUID-type (encrypted) paramater which I then check on the destination site for validity, and if good then logging them in automatically. [edit] The GUID is an ecrypted conglomerate of the user ID and a timestamp - so the link must not only be validated on the second site, but it is also only valid for the few seconds needed for the navigation to take place.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900