google / google/GoogleSignIn-iOS

Documenting errors of revoked tokens

オープン
#93 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Objective-C
スター
750
フォーク
282
平均マージ
2日 15時間
マージ済み PR(30日)
9

説明

Hi,

In our apps we need to know whether the Google token was revoked or not, so we can delete other data that was obtained using that token. Today, if one tries to call `restorePreviousSignInWithCallback:` when the token was revoked, we get the following error:

```
Error Domain=org.openid.appauth.oauth_token Code=-10 "invalid_grant: Token has been expired or revoked." UserInfo={OIDOAuthErrorResponseErrorKey={
error = "invalid_grant";
"error_description" = "Token has been expired or revoked.";
}, NSLocalizedDescription=invalid_grant: Token has been expired or revoked., NSUnderlyingError=0x281ab7e40 {Error Domain=org.openid.appauth.remote-http Code=400 "{
"error": "invalid_grant",
"error_description": "Token has been expired or revoked."
}" UserInfo={NSLocalizedDescription={
"error": "invalid_grant",
"error_description": "Token has been expired or revoked."
}}}}
```

Which comes directly from https://github.com/openid/AppAuth-iOS. Can this error be explicitly documented? Either by documenting that this is the error returned, or introducing a new error code to `GIDSignInErrorCode`.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。