I've integrated Google SignIn (2.2) based on instructions here: https://developers.google.com/identity/sign-in/ios/start
It works when there is no Google app on the device. So Google SDK opens a web view where I can sign in a google account, and GIDSignInDelegate method didSignInForUser is called with a valid access token with no error.
But if I have Google app or Youtube app installed, the SDK will open the Google app, where I can sign in my google account, and when I choose the account and it redirects back, it throws an error:
"A potentially recoverable error occured. You may try again."
No matter how many times I retry it never worked.
(Deep link url: com.googleusercontent.apps.<my app id>://api/sso/v1/tokenResponse?ec=-216414001&e=A%20potentially%20recoverable%20error%20occured.%20You%20may%20try%20again)
Has anyone seen the same issue? What could go wrong?
Update your device to the latest version of iOS or iPadOS. You can update your device wirelessly by going to Settings > General > Software Update and if there is an update, follow the onscreen instructions to update your device. Clear the history, cache and cookies to see if this fixes your problem.
On your iPhone or iPad, open the Safari app. Go to www.google.com. Tap your profile image or Sign in. Follow the sign-in steps.
The reversed client ID is your client ID with the order of the dot-delimited fields reversed. For example: com.googleusercontent.apps.1234567890-abcdefg.
So it turns out to be a typo in the app bundle id in Google Developers Console.
As requested in some comments, here are some more details: In order to support google sign in, you need to a client id in https://console.developers.google.com under APIs & Auth/Credential In our case, we were seeing the error because in the client id we created for iOS app, we had a typo in the app bundle id. (Instead of com.companyname.appname we typed com.companyname.companyname)
I guess there can 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 every field makes sense to you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With