Eg: Gmail, Orkut, Wava and feedburner login access using single google account.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your question is too unspecific to give a precise answer. If you’re trying to let users log in to your website using Google accounts, it’s documented here.
On the other hand, if you’re trying to let your users sign in to several websites you control with one account, here’s how you can do it:
Make all login links on your sites point to a centralized login page, but include information about where the user came from in the link. For example:
Then, once the user has logged in successfully, you redirect the user back to the original site while passing along whatever information you need about the authenticated user.
However, you also need to make sure that people can’t just circumvent your authentication mechanism by adding the necessary authentication parameters to the URL. This can be done by including a signature in the form of an HMAC-SHA-256 of the parameters plus a secret that’s stored on both login server and the originating site. (Preferably this key should be different for each site using your SSO system.)
Then, in the originating site, if the signature matches the user is already logged in. Store the info about the logged in user in session variables (not a cookie):
Note that I’m using a function added in PHP 5.6:
hash_equals. If you’re on lower than 5.6, you can use this substitute function which implements a timing-safe comparison function using double HMAC verification:This is obviously a very crude implementation, but it should be a decent starting point.