Setting up CORS for Google Sign-in fails for mobile browser?

169 views
Skip to first unread message

Ali Sabet

unread,
Jun 4, 2021, 8:29:47 AM6/4/21
to Google Cloud Developers

I authorized my website as an origin for my webapp's Google Sign-in service in GCP. Sign-in works for desktop browser, but the mobile browser fails with the following error:

PlatformException(idpiframe_initialization_failed, Not a valid origin for the client: https://[redacted].app has not been registered for client ID [redacted].apps.googleusercontent.com. Please go to https://console.developers.google.com/ and register this origin for your project's client ID., https://developers.google.com/identity/sign-in/web/reference#error_codes, null)

Any ideas how to fix this?

David Charles Martinez

unread,
Jun 7, 2021, 4:39:58 PM6/7/21
to Google Cloud Developers

Hello,

With the information you have provided, it could be an issue with the way you configured your OAuth client. Maybe you chose web server when configuring it? Please review this third party post for more information.

Reply all
Reply to author
Forward
0 new messages