0

"On April 20, 2017, we will start blocking OAuth requests using web-views for all OAuth clients on platforms where viable alternatives exist."

We received this notice. In our iOS app using the Google drive, but google drive sdk no updated. google drive sdk still uses the old way. We need to modify the authorization method?

ilyon
  • 233
  • 2
  • 13
  • Use Google Sign In or GTMAppAuth - See https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html – Paulw11 Apr 10 '17 at 02:54
  • you can also do the authentication part using GIDSignin and use Google drive SDK. Check http://stackoverflow.com/questions/40654403/403-error-disallowed-useragent/42045386#42045386 – Jen Jose Apr 10 '17 at 03:00

1 Answers1

1

If you are using the WebView for Google OAuth authentication (i.e. if the user has to type the Gmail address and password in a WebView), yes, you have to update it.

You have two options.

  1. SFSafariViewController: Load the Google login URL in the SFSafariViewController instead of the WebView. If you are accessing any cookies in the WebView, you cannot do that in the SFSafariViewController. For iOS 8 and below, which does not support SFSafariViewController, you can fallback by opening the Safari browser to authenticate.

  2. Google Sign In SDK: Use Google Sign In for iOS SDK. You put a Google Sign In button in your app and use the Google APIs to authenticate.

For more information, refer this presentation from Google devs: https://docs.google.com/presentation/d/1z7bgAqYcEt7EHRmwe3T-vF_iMw9e8Wyxr10wPudypEo/present?slide=id.g135ae23358_0_71

Bob
  • 13,447
  • 7
  • 35
  • 45