Reputation: 592
I use the https://www.googleapis.com/auth/userinfo.email
scope to get an email address of the authenticated user. But while authenticating, Google prompts the user:
The app would like to:
- Know who you are on Google+ (for which the help icon says: This app is requesting permission to associate you with your public Google profile)
- View your email address
I don't want the user's Google+ related information. I am using the OAuth2 authentication method. For Authsub request authentication it requires only email address access. How can I get access to the user's email address alone?
Upvotes: 18
Views: 2911
Reputation: 1188
If anyone is still searching for this, I think this might help. In the gapi.auth2.init method in the Google Sign In JS client reference, set fetch_basic_profile to false (it's true by default). Now using the scope param for the same method specify "email", "profile" permissions
Upvotes: 1
Reputation: 6851
If you are using Google+ Sign-In, the https://www.googleapis.com/auth/plus.login
scope is automatically included, which would be why you were seeing that portion of the permission dialog.
If you do not need the enhanced features that come along with the Google+ Sign-In feature, then you'd probably want to do a standard OAuth flow. See the Google OAuth scenarios for a solution that might fit your needs where you can ask for only the email scope.
Upvotes: 2