vishal43it / socialauth

Automatically exported from code.google.com/p/socialauth
0 stars 0 forks source link

Which attributes can be used to identify an user (primary key)? #158

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I thought that the pair "getProviderId(), getValidatedId()" could be used as 
key to identify a user. But it isn't true for example for google accounts. You 
can get differents getValidatedId() values for the same user. I wanted to use 
the pair "getProviderId(),getEmail()" but getEmail() is null for twitter for 
example...

How can I identify to a user (primary key)?

Thank you very much!

Original issue reported on code.google.com by yosauron...@gmail.com on 14 Mar 2012 at 5:56

GoogleCodeExporter commented 9 years ago
getValidatedId() will always be same of a user for the same provider. So you 
can use it as a primary key.
But it is not possible to match the user from different provider for uniqueness.

Regards
Tarun

Original comment by tar...@brickred.com on 15 Mar 2012 at 12:43

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi Tarum, 

I'm afraid that google doesn't return the same idValidate to an user. 
This is true for a little time (like a month or two months). I have stored 
users in a database when they logged in the app. And I have found that a same 
email account in google has  more than 1 idValidate...

Thank you for your reply Tarum

Original comment by yosauron...@gmail.com on 15 Mar 2012 at 3:26