GIDSignIn.sharedInstance.signIn(with: config, presenting: rootViewController()) { user, error in // (The error is showing at the signIn function )
if let error = error { // ... return }
guard let authentication = user.authentication, let idToken = authentication.idToken else { return }
let credential = GoogleAuthProvider.credential(withIDToken: idToken, accessToken: authentication.accessToken)