Php Google登录(iOS)使用后端服务器进行身份验证无效颁发者错误

Php Google登录(iOS)使用后端服务器进行身份验证无效颁发者错误,php,ios,objective-c,google-signin,Php,Ios,Objective C,Google Signin,嗨,当我使用google php API验证服务器中的令牌id时,我有无效的颁发者错误。令牌从iOS google登录中检索,并将http post请求传递给服务器 验证令牌的PHP代码 $client->verifyIdToken($token) 返回错误,但使用了用户凭据 Invalid issuer, https:\/\/accounts.google.com != accounts.google.com: {\"iss\":\"https:\/\/accounts.google.

嗨,当我使用google php API验证服务器中的令牌id时,我有无效的颁发者错误。令牌从iOS google登录中检索,并将http post请求传递给服务器

验证令牌的PHP代码

$client->verifyIdToken($token)
返回错误,但使用了用户凭据

Invalid issuer, https:\/\/accounts.google.com != accounts.google.com: {\"iss\":\"https:\/\/accounts.google.com\",\"at_hash\":\"ZYZ\",\"aud\":\"apps.googleusercontent.com\",\"sub\":\"XYZ\",\"email_verified\":true,\"azp\":\"XYZ\",\"email\":\"ZYP\",\"iat\":1449542280,\"exp\":1449545880}
我遵循谷歌开发人员的指示


确定找到了问题。对于将来可能遇到类似问题的人,不要使用google php api文档中规定的版本,即
1.0.*@beta
。使用
1.1.*
或更高版本

"require": {
  "google/apiclient": "1.1.*"
}

在git repo中发现此问题是在版本
1.0

后修复的。这不是特定于IOS的,它适用于尝试验证访问令牌的任何客户端。