IOS - Google SignIn does not work if the Google application is on the device

I have included Google SignIn (2.2) based on the instructions here: https://developers.google.com/identity/sign-in/ios/start

It works when there is no Google app on the device. In this way, the Google SDK opens a web view where I can log in to the google account, and the GIDSignInDelegate didSignInForUser method is called with a valid access token without errors.

But if I have the Google application or the Youtube application installed, the SDK will open the Google application, where I can log in to my google account, and when I select the account and redirect it back, it gives an error message:

"A potential error has occurred. Please try again."

No matter how many times I repeat, it never worked.

(Deep link URL: com.googleusercontent.apps. <My app id>: // api / sso / v1 / tokenResponse? Ec = -216414001 & e = A% 20potentially% 20recoverable% 20error% 20ccured.% 20You% 20may% 20try % 20again )

Has anyone seen the same problem? What could go wrong?

+5
source share
2 answers

So this is a typo in the application package identifier in the Google Developers Console.

As indicated in some comments, here are some more details: To support Google login, you need to specify the client ID https://console.developers.google.com by API and Auth / Credential In our case, we saw an error, because in the identifier the client that we created for the iOS application, we had a typo in the identifier of the application package. (Instead of com.companyname.appname we typed com.companyname.companyname)

I assume that there may be other ways to cause the same error, but one good place to check is the developer console ( https://console.developers.google.com ), just make sure that each field makes sense for you.

+2
source
0
source

All Articles