I am trying to integrate the GoogleSignIn
structure into an iOS application, and also authenticate the user on the server. I managed to log in to the user's system, but in the delegate method - (void)signIn:(GIDSignIn *)signIn didSignInForUser:(GIDGoogleUser *)user withError:(NSError *)error
, user.serverAuthCode
is nil
, and I need to pass this authentication code server to, uhm, authenticate the user on the server.
I am reading this documentation page and it claims that I need to set the serverClientID
property for [GIDSignIn sharedInstance]
, but nowhere is indicated where I can find this "server client identifier". I conducted tests with all the keys in the world to no avail.
Then I found out this documentation page , which looks like it is trying to tell us where to find this magic identifier, but with poorly worded language it didn't help. I have OAuth2 credentials with type Web application
, but:
- They are used for a web application (client) that matches my iOS application, which also communicates with the server
- I tried to use it and it did not work.
Has anyone managed to successfully escape from the Google documentation clusters (poor)?
source share