Reputation: 3336
Although I don't see this documented anywhere, I am assuming that the User
object returned by the Google Users API has a 1-1 correspondence with a Google ACCOUNT, rather than an email address.
Assuming that to be true, and bearing in mind that Google Accounts can be associated with multiple email addresses, is it the PRIMARY EMAIL address of the Account that is returned by the email()
method?
ie. the Primary Email as listed in https://www.google.com/settings/account for that user.
Upvotes: 0
Views: 138
Reputation: 3336
The answer is yes - Google Users API returns the PRIMARY email address of the Google Account.
Upvotes: 0
Reputation: 123
The Google Account and the email address are one in the same in this case. This is demonstrated by the User class, which can only be constructed by an email address or a federated identity (depending on the identity set up of the app).
If the User constructor is called with an email address that does not correspond with a valid Google account, the object will be created but it will not correspond with a real Google account. https://developers.google.com/appengine/docs/python/users/userobjects?hl=en
Where you're thinking of multiple email addresses, I think that may be multiple Google accounts that can be linked. When using app engine's Google auth option the user is still prompted to pick a specific account to authenticate against (from a list of linked accounts if more than one).
Upvotes: 0