authentication不适用于谷歌应用程序

我在使用homeServerClientID和身份validation时遇到了一些麻烦,我可以在谷歌示例中重现。

问题是:

情况1:如果我有谷歌应用程序已经安装

  • 我从我的应用程序点击loginbutton
  • 它在谷歌应用程序帐户select打开帐户
  • authentication后,它切换回我的应用程序
  • 在finishedWithAuth委托方法中出错(com.google.HTTPStatus错误400)

情况2: Google应用程序未安装

  • 与Safari浏览器身份validation工作正常。

码:

GPPSignIn *signIn = [GPPSignIn sharedInstance]; signIn.shouldFetchGooglePlusUser = YES; signIn.shouldFetchGoogleUserEmail = YES; signIn.clientID = @"XXXXX.apps.googleusercontent.com"; // Replace dummy XXXX // Your server's OAuth 2.0 client ID signIn.homeServerClientID = @"YYYYY.apps.googleusercontent.com"; // Replace dummy YYYY signIn.scopes = @[@"https://www.googleapis.com/auth/calendar"]; signIn.delegate = self; 

而且我正在打电话

 [[GPPSignIn sharedInstance] authenticate]; 

代表:

 - (void)finishedWithAuth:(GTMOAuth2Authentication *)auth error:(NSError *)error { 

如果安装了谷歌应用程序,身份validation为零,并返回错误作为com.google.HTTPStatus error 400

更新:在跟踪器上创build了一个错误 – https://code.google.com/p/google-plus-platform/issues/detail?id=1145