How to prevent the extra view displaying an access code when using Google OAuth 2.0

前端 未结 8 924
挽巷
挽巷 2020-12-14 12:18

I followed http://googlemac.blogspot.com/2011/05/ios-and-mac-sign-in-controllers.html to allow users to use Google to login to an iPhone app. After I tap \"Allow access\" bu

相关标签:
8条回答
  • 2020-12-14 13:02

    I fixed this by nesting the view controller inside of a UINavigationController. No idea why did that did the trick, but it did.

    So instead of

    [self presentModalViewController:viewController animated:YES];
    

    ... use

    UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
    [self presentModalViewController:navigationController animated:YES];
    
    0 讨论(0)
  • 2020-12-14 13:02

    When using gtm-oauth2 to sign in to Google services, be sure the Google API Console project registration shows in the API Access section that the Client ID is issued for an installed application. This is described in the gtm-oauth2 documentation.

    0 讨论(0)
提交回复
热议问题