问题
I implemented a while ago google sign in on my app. everything was working. Im requesting a google profile and email scopes and when calling https://www.googleapis.com/oauth2/v3/tokeninfo?id_token= with the token i received in the app and i got the user profile.
today i run the code and i get the token without the profile only email and email verified. log in via android and via web return with profile. the only problem is with the ios. i can see also that the idtoken in ios is smaller then the one i received via android/web
GIDSignIn.sharedInstance().delegate = self
GIDSignIn.sharedInstance().uiDelegate = self
GIDSignIn.sharedInstance().clientID = kClientId
GIDSignIn.sharedInstance().scopes.append("https://www.googleapis.com/auth/plus.login")
GIDSignIn.sharedInstance().scopes.append("https://www.googleapis.com/auth/plus.me")
GIDSignIn.sharedInstance().signInSilently()
回答1:
GIDSignIn.sharedInstance().delegate=self
GIDSignIn.sharedInstance().uiDelegate=self
GIDSignIn.sharedInstance().scopes.append("https://www.googleapis.com/auth/plus.me")
GIDSignIn.sharedInstance().signIn()
This is my button on click and it is perfectly working for me.
来源:https://stackoverflow.com/questions/38245484/ios-google-sign-in-not-getting-profile-scope