I am integrating Sign in with Google with iOS Firebase SDK. When a user taps on the GIDSignIn button, the app shows an alert showing "MyAPP" want to use Google.com for Sign in, but the alert dismisses quickly. The error I get in the didSignInFor user: GIDGoogleUser method as follows:
2019-02-21 16:54:13.104279+0530 MyApp[18743:185089] [Warning] Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior (<SFAuthenticationViewController: 0x7fa327945800>)
[DEBUG] Google sign-in error: Error Domain=com.google.GIDSignIn Code=-5 "The user canceled the sign-in flow." UserInfo={NSLocalizedDescription=The user canceled the sign-in flow.}
I have followed the Authenticate Using Google Sign-In on iOS documentation.
I also tried the answer at Google Sign-In crashes on iOS 9 attempting to call canOpenURL, but it is not working.
The AppDelegate implements GIDSignInUIDelegate as well.
If I change the button from GIDSignInButton to UIButton, it works, but the style is lost.