We implemented Google OAuth for our website a few months ago. So far two users (of ~100) have had incomplete userinfo profiles. We make a call to 'https://www.googleapis.com/oauth2/v1/userinfo?', with a valid token and the response json contains only, [locale, verified_email, email, id].
The docs (https://developers.google.com/accounts/docs/OAuth2Login#userinfocall) are not explicit, but the way I interpret them,
The response should ALWAYS include: [id, email, verified_email, name, given_name, family_name, timezone, gender] and SOMETIMES include: [picture, locale]
Does anyone know what kind of guarantee comes with the UserInfo API? Should I reject incomplete profiles as invalid? Is there any other explanation for why the profile would be incomplete?
UPDATE 3/6/14
I was able to replicate the problem. We send the user off to google requesting, two scopes:
https://www.googleapis.com/auth/userinfo.profile
and
https://www.googleapis.com/auth/userinfo.email
So far as I can tell google does not allow users to cherry pick which scopes they allow. It's all or nothing. However, I was able to remove the userinfo.profile scope from the URL and reload the page. This caused me to be send back with a valid token, but not the correct scope. I'll need to hit the tokeninfo endpoint and make sure the correct scope has been authorized.