| Issue 9: | Not getting unique Google ID on $openid->identity | |
| 1 person starred this issue and may be notified of changes. | Back to list |
I just implemented this so I'm not sure if I'm understanding correctly, but from the example, it looks like to get Google's unique identifier for the user, you do: $openid->identity; When looking at the code in get's magic method: return $this->claimed_id; But if I var dump $this, the id is stuck at the end of (where XXXX's are): [data][openid_claimed_id] => https://www.google.com/accounts/o8/id?id=XXXXXXX whereas [claimed_id:private] => is empty.... I hope that makes sense? On Google's documentation: https://code.google.com/apis/accounts/docs/OpenID.html they state that they provide a unique ID, this way even when a user changes their name, we can be sure to uniquely identify them...Here's the exact quote: "The Google-supplied identifier, which has no connection to the user's actual Google account name or password, is a persistent value; it remains constant even if the user changes their Google user name and/or email address. This identifier is also a "directed identity", that is, Google returns a different value to each relying party. Google uses the request parameter openid.realm to recognize the relying party, so if the third-party application decides to change this value, all user identifiers will change." BTW this id seems identical in their example: &openid.identity=https://www.google.com/accounts/o8/id/id=AItOawl27F2M92ry4jTdjiVx06tuFNA &openid.claimed_id=https://www.google.com/accounts/o8/id/id=AItOawl27F2M92ry4jTdjiVx06tuFNA
Oct 2, 2010
Project Member
#1
mewp...@gmail.com
Oct 2, 2010
Oops, heh heh, my bad. Thanks!
Oct 2, 2010
(No comment was entered for this change.)
Status:
Invalid
Feb 18, 2014
but how to get userid with $openid? ps: i want to get avatar of user gooogle by $openid
Feb 18, 2014
This is a bugtracker, not a place to ask questions. I'd suggest reading a bit about OpenID itself (so that you know why there's no such thing as "userid", other than `$openid->claimed_id`), and then, if you still have questions, asking them on StackOverflow (or somewhere else if you like). That will make it easier for other people to find the answer to your, and similar questions, not to mention that more people will see and possibly answer them. |