GTMOAuth2ViewControllerTouch OAuth problem
Closed this issue · 1 comments
According to Google's blog on 22/08/2016 at https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html, embedded user-agent (also know as a webview) is not allowed to make an OAuth authorisation any more. That's the reason why I got an error when I tried on this demo project(https://developers.google.com/drive/ios/quickstart) to present a GTMOAuth2ViewControllerTouch view controller:
GTMOAuth2ViewControllerTouch *authController;
NSArray *scopes = [NSArray arrayWithObjects:kGTLAuthScopeDriveMetadataReadonly, nil];
authController = [[GTMOAuth2ViewControllerTouch alloc]
initWithScope:[scopes componentsJoinedByString:@" "]
clientID:kClientID
clientSecret:nil
keychainItemName:kKeychainItemName
delegate:self
finishedSelector:@selector(viewController:finishedWithAuth:error:)];
My question is: it seems that GTMOAuth2ViewControllerTouch is not allowed be used any more, what's the alternative way?
Yup, looks like server side decided to start closing things off. We're going ahead and deprecating this as there are other alternatives that include support for more things (including tvOS). We'll be updating the projects that used this in the sample code also.