1
votes

Using google's Oauth 2 Playground, it can be shown that:

  1. If you select just the google OAuth api v2 scope, and get the email using the url in the title here, then you get the gmail address.
  2. On The other hand, if you select that scope and the youtube scope https://www.googleapis.com/auth/youtube, then instead of a gmail address you get a google+ email address.

It seems disturbing that this happens; I want to use the gmail address to identify the user in the app. How can I just get the gmail address everytime, regardless of the combination of scopes? I don't want to make the user login twice (once to get a token for youtube api v3, and once to get a token to get the gmail address from the Oauth api v2.

Also, one other annoyance; in the "The app would like to" screen, the /auth/userinfo.email scope results in us being told that the app wants to "view your email address" "know who you are on Google+"....I really would rather it didn't cause the latter!

1

1 Answers

0
votes

Not sure I understand the difference between gmail email address and google+ email address. Is it that your user has two simultaneous logins and is using a different one for each scope?

Google recommends NOT using the email address as the identifier since it can change. Alongside the email address is a google user ID, which you should be using as the identifier.

+1 for the comment about "know who you are on Google+". I don't want it, didn't ask for it, but Google puts it up and it's killing my customer acquisition.