I upgraded to GoogleSignIn 6.0 on iOS and I can not find a way to specify scopes for login at the time of signIn. All I can see is an API called addScopes() where I can specify scopes after basic signIn. But this results in two separate prompts for signIn which is weird. Earlier, we could simply specify scopes for signIn like this:
signIn = GIDSignIn.sharedInstance()
signIn.scopes = ["https://www.googleapis.com/auth/youtube.upload"]
signIn.signIn(...)
I wonder if there is any sample code for new GoogleSignIn 6.0? Even the sample code supplied by Google has two step sign in, first for general signin and then add scopes sign in.
Right now it's recommended to perform two-stage requests: sign in first, and then request permission for scopes.
Reference: https://github.com/google/GoogleSignIn-iOS/issues/23#issuecomment-880233289