google / google/GoogleSignIn-iOS

Documenting errors of revoked tokens

Đang mở
#93 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Objective-C
Star
750
Fork
282
Merge trung bình
2 ngày 15 giờ
Pull request đã merge (30 ngày)
9

Mô tả

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`.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.