Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get unique identifier from OpenID / Google?

Tags:

openid

For OpenID, when authenticated against Google, the authenticated URL that is returned is different across different browsers, IP addys, &c.

How does one obtain a unique user identifier from Google's OpenID implementation?

Login on one computer and I can get the following: https://www.google.com/accounts/o8/id?id=AItOawk......_OESXik

Login on my BlackBerry with same user account I get a different URL: https://www.google.com/accounts/o8/id?id=AItOawk......_ABIRop

Shall I assume yet a tertiary HTTP call must be made somewhere to uniquely identify the login?

like image 330
Jé Queue Avatar asked Aug 23 '10 17:08

Jé Queue


1 Answers

Google issues per-realm identifiers, so as long as you login to the same website, you should get the same identifier for the same user.

Unless, of course, the site's openid implementation is broken and sends different realms based on different ip-s, or even on current session id (which could easily happen if it's in the url).

Try logging in on another website, such as stackoverflow, and check if it still returns different identifiers.

like image 88
Mewp Avatar answered Oct 22 '22 10:10

Mewp