Inter-Domain Authentication Methods

One of my latest projects, a trainer & training providers database contains an area for displaying various training venues.  This is to help training providers to find a location to run their training courses in accross the country.
 

We also have another site for advertising training venues which will be used for venues to register and place their adverts.  This will then be added to the database on both sites.  It also logs them in on the Venue Hound site.  The only problem is that I wanted to log them in on Find Trainers as well.
 
What with a large numbers of users having third party cookies disabled, using that as an authentication methos is ruled out.  I could have used the database and login scripts on both sites so they use the same informtaion to login, but that kind of defeats the whole point of trying to have a unified login.
 

I decided to come up with another plan.  Both sites are written in PHP and so any particular page I serve up can have the links modified to different URLs.  Using this and a cookie set for the Venue Hound domain, I can modify the links displayed for Find Trainers to have extra information in the URL.  When the user arrives at findtrainers.co.uk the PHP in the page will take the extra information in the URL, check it with the database and assuming the information is correct, log them in!
 
Hey presto and Bob´s your uncle.  Its not foolproof and you have to be a bit tighter with security, but it works fairly well.

About the Author

I'm a web developer based in the East Midlands, UK and if I keep up the current rate, I might have developed 3 million sites by the time I retire