title: React.js App Login with Google, Error "idpiframe_initialization_failed"
body: <p>I am implementing Login with Google for my react.js application. I have followed the steps from this tutorial video: <a href="https://youtu.be/75aTZq-qoZk" rel="nofollow noreferrer">https://youtu.be/75aTZq-qoZk</a>.</p>
  <p>I am running my app from http://localhost:3000, I have registered it with my client Id at Google Cloud Platform under &quot;Authorised JavaScript origins&quot; heading. However, I am still getting this error:</p>
  <pre><code>{
      &quot;error&quot;: &quot;idpiframe_initialization_failed&quot;,
      &quot;details&quot;: &quot;Not a valid origin for the client: http://localhost:3000 has not been registered for client ID. Please go to https://console.developers.google.com/ and register this origin for your project's client ID.&quot;
  }
  </code></pre>
  <p>Here is my code:</p>
  <pre><code>import React, { Component } from 'react'
  import GoogleLogin from 'react-google-login';
  
  export default class Login extends Component {
  
      googleLoginSuccess = (googleData) =&gt; {
          console.log(&quot;Success&quot;, googleData);
      }
  
      googleLoginFailure = (result) =&gt; {
          console.log(&quot;Failure&quot;, result)
      }
  
      render() {
          return (
              &lt;GoogleLogin
                  clientId={process.env.REACT_APP_GOOGLE_CLIENT_ID}
                  buttonText=&quot;Login&quot;
                  onSuccess={this.googleLoginSuccess}
                  onFailure={this.googleLoginFailure}
                  cookiePolicy={'single_host_origin'}
              /&gt;
          )
      }
  }
  </code></pre>