Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not getting unique Google ID on $openid->identity #9

Closed
GoogleCodeExporter opened this issue Mar 21, 2015 · 6 comments
Closed

Not getting unique Google ID on $openid->identity #9

GoogleCodeExporter opened this issue Mar 21, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

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:

http://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=AItOawl27F2M92ry4jTdji
Vx06tuFNA

&openid.claimed_id=https://www.google.com/accounts/o8/id/id=AItOawl27F2M92ry4jTd
jiVx06tuFNA


Original issue reported on code.google.com by joede...@gmail.com on 1 Oct 2010 at 11:24

@GoogleCodeExporter
Copy link
Author

Just one question:
Does $openid->identity not return valid value for you? I've just tested the 
example, and it works fine for me(and it does return claimed_id), so I can't 
reproduce the problem.

$this->claimed_id is set at the beggining of validate() function. Before 
calling it, you shouldn't read $openid->identity at all (since an unverified 
identity is worthless).

Original comment by mewp...@gmail.com on 2 Oct 2010 at 10:14

@GoogleCodeExporter
Copy link
Author

Oops, heh heh, my bad. 

Thanks!

Original comment by joede...@gmail.com on 2 Oct 2010 at 4:54

@GoogleCodeExporter
Copy link
Author

Original comment by mewp...@gmail.com on 2 Oct 2010 at 6:17

  • Changed state: Invalid

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

but how to get userid with $openid?
ps: i want to get avatar of user gooogle by $openid

Original comment by huydung...@gmail.com on 18 Feb 2014 at 4:11

@GoogleCodeExporter
Copy link
Author

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.

Original comment by mewp...@gmail.com on 18 Feb 2014 at 6:51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant