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

前端 未结 8 986
挽巷
挽巷 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 12:53

    I tried this approach, and work fine, put this in your webViewDidFinishLoad method :

    if ([webView.request.URL.absoluteString rangeOfString:@"https://accounts.google.com/o/oauth2/approval?"].location != NSNotFound) {
        webView.hidden=YES;
    }
    

提交回复
热议问题