Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How stackoverflow accomplish login via Gmail?

I want to know how stackoverflow.com enables login via my Gmail Account.

Is there any arrangment between the two companies? Or its just an api ?

Does Gmail send information to Stack Overflow?

Where can I find the API?

like image 917
Royi Namir Avatar asked Aug 10 '11 08:08

Royi Namir


3 Answers

This is called Open ID based authentication this is a very nice presentation which explain Why and How it works

When you go to some site like stackoverflow it gives you option to login via Yahoo or Gmail or any other Open ID provider.

Let's say you choose Yahoo. StackOverflow will then ask Yahoo to authenticate you using your ID + password and give stackoverflow result whether you were successful or not. If you are successful, stackoverflow now know you are authentic user and it will log you in. In this way stackoverflow can avoid storing user ids and password for every member and you can avoid need of creating another ID just for stackoverflow

like image 198
Haris Hasan Avatar answered Oct 11 '22 14:10

Haris Hasan


Its called OpenID, google just implements the protocol.

like image 36
TJHeuvel Avatar answered Oct 11 '22 14:10

TJHeuvel


As you can see via the login page, SO have used G apis with several other vendor API's along with OpenID as TJ mentioned. So upon logging in, the G API redirects back to the SO with the login information stuffs.

Even making use of the same API's, you could have your website do the same.

like image 34
Zenwalker Avatar answered Oct 11 '22 14:10

Zenwalker