GPPSignIn错误invalid_grant / Token已被撤销

时间:2015-05-04 09:14:08

标签: ios iphone google-plus google-plus-signin

关注此问题: GPP iOS not refreshing token

所以我正确地接收刷新令牌,如果我使用该应用程序一段时间。问题是,如果我将应用程序放在后台几个小时(我注意到超过3-4个小时),下次当我trySilentAuthentication时,它会返回以下错误:

Error Domain=com.google.HTTPStatus Code=400 
"The operation couldn’t be completed. (com.google.HTTPStatus error 400.)" 
UserInfo=0x7feefbfa4cd0 {  
                         json={ error = "invalid_grant"; 
                         "error_description" = "Token has been revoked."; }

我必须指定没有人手动撤销令牌或手动完成的任何其他操作。

更奇怪的是,有时在收到此错误后,如果我终止应用程序,然后再次打开它并运行trySilentAuthentication,它正在运行,并且正确生成了新令牌,但有时不会工作

还有什么我需要做的,比如再次显示同意屏幕吗?对于用户而言,每天看到该屏幕会非常不愉快。

非常感谢任何帮助。

0 个答案:

没有答案