Google Auth API - idpiframe_initialization_failed on Production environment

Viewed 513

I integrate Google's Auth API in my production website.
When I enter the login page, it throws an idpiframe_initialization_failed exceptions to the console.
I found out that I can fix it by enabling that API / Cookies in my chrome browser, but I want to find a comprehensive solution that will prevent those exceptions in my production environment.
So my two questions are:

  1. What do you suggest me to do in order to achieve that?
  2. In general, what is the meaning of those excpections?

enter image description here

enter image description here

Thanks :)

1 Answers

If you have a production url like http://godaddysite.com etc host your page there with a Webserver. Opening a htnl page from your computer with javascript doesnot work as it is not hosted on webserver. Please check your redirect url etc when you created Oauth client. Go to the Credentials page. Click Create credentials > OAuth client ID. Select the Web application application type. Name your OAuth 2.0 client and click Create

check origins create new OAuth with correct origins.

Related