title: Firebase Login Popup closes automatically on Heroku
body: <p>We are using FireBase login for our app in React and the flow seems to be working fine on localhost. </p>
  
  <p>But when we deploy our app on Heroku, the login with google window appears on screen and closes almost instantaneously. </p>
  
  <p>Here's my auth.js </p>
  
  <pre><code>export function loginWithGoogle (email, pw) {
    const provider = googleAuthProvider;
    return firebaseAuth().signInWithPopup(provider)
    .then(saveUser)
    .catch(error =&gt; console.log(error));
  }
  </code></pre>
  
  <p>Here's login.js </p>
  
  <pre><code>handleGoogleLogin = e =&gt; {
      e.preventDefault();
      loginWithGoogle()
        .then(response =&gt; {
          // This gives you a Google Access Token. You can use it to access the Google API.
          console.log("After auth...",response);
          //const TOKEN = response.credential.accessToken;
          console.log("result...", response);
  
          //TODO: Need to call ConsumeSafe API to store the user details
          console.log("invoking getUser");
          getUser(response.data.user.Email).
          then((res) =&gt;{
            this.props.loginHandler(res);
          });
  
        })
        .catch(error =&gt; {
          console.log("Error in popup...",error);
          this.setState(setErrorMsg("Invalid username/password."));
        });
    };
  </code></pre>
  
  <p>However none of the files catch any error but the window closes. </p>
  
  <p>On my google dev console, I went to Credentials > Oauth2 Web client and added my heroku app url under authorized javascript origins. Still the same result</p>