3

I'm using oAuth2, and I have a project in my google API console with an iOS client and a Web client registered.

I'd like to auth in from my iOS app, and have my web backend retrieve an access token so it can do the heavy processing work with the Google api.

I've tried following these instructions which are for android: https://developers.google.com/accounts/docs/CrossClientAuth

But I keep getting an invalid scope when I assign the scope as:

oauth2:server:client_id:MY.WEB.CLIENT.ID:api_scope:http://www.google.com/m8/feeds/ https://mail.google.com/ https://www.googleapis.com/auth/plus.login

Anyone successfully implement a similar set up for iOS? If so please explain or share documentation? What libraries or SDKs did you use to get the code from google on the iOS app that the web backend could use to generate a proper access token of it's own?

Zachary Melamed
  • 256
  • 1
  • 2
  • 10
  • 1
    I think it's not just iOS. This guy reports the same issue with an android app - http://stackoverflow.com/questions/18361054/getting-google-oauth-authorization-token-from-android-return-with-invalid-scope/18364768#18364768 – divyanshm Aug 22 '13 at 03:18
  • Did you get this to work? I have the same question: http://stackoverflow.com/questions/42105485/cross-client-google-oauth-get-auth-code-on-ios-and-access-token-on-server – quantum Feb 08 '17 at 06:13

1 Answers1

0

As of June 18th, the google iOS SDK 1.7.0 supports one-time authorization code which is consistent with the Android feature: https://developers.google.com/+/release-notes/

James
  • 146
  • 1
  • 12