google / gtm-oauth2

Google Toolbox for Mac - OAuth 2 Controllers
Apache License 2.0
126 stars 70 forks source link

default scopes added automatically? #78

Closed klwinkel closed 7 years ago

klwinkel commented 8 years ago

I am requesting DriveFile acces for my app, but always also get email and userprofile too in the window were the user needs to grant access. is this normal?

this is my code:

GTMOAuth2ViewControllerTouch *authViewController = [[GTMOAuth2ViewControllerTouch alloc] initWithScope:kGTLRAuthScopeDriveFile clientID:kClientId clientSecret:nil keychainItemName:kKeychainItemName delegate:self finishedSelector:finishedSelector];

thomasvl commented 8 years ago

Since most apps end up wanting to disable a little info about the user (Logged in as User user@gmail.com), the code defaults to adding the scopes and fetching that info. See the header for more info:

https://github.com/google/gtm-oauth2/blob/master/Source/GTMOAuth2SignIn.h#L95-L104