We first reported this on a Google Issue Tracker but were redirected here.
We have been using Google Sign-In for iOS in our iOS app. When a user signs in, our GIDSignInDelegate receives a call to sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!).
Until this afternoon, the GIDGoogleUser that we receive in this call has always contained a non-nil authentication?.idToken and a non-nil serverAuthCode, or else error is non-nil and contains information about why authentication failed.
Beginning last week, intermittently, signing in results that method being called with a nil user?.serverAuthCode, which prevents us from completing authentication. At the same time, authentication?.idToken is non-nil and error is nil, as if there had been no failure in authentication.
This is occurring as well in versions of our app that were built and released, suggesting that this issue was not triggered by any change in our client code.
Any ideas?
Update: at the end of last week this was affecting the majority of our signins, but this week we aren't seeing it anymore. Was there an issue on Google's side?
来源:https://stackoverflow.com/questions/45147176/google-sign-in-for-ios-serverauthcode-is-intermittently-missing