Search code examples
phpjavascriptgitgoogle-openid

Google Identity Toolkit HTTPS issue


Home URL is http
Login URL is https

I have found that if I change the login URL although it says you are submit unsecure data the functions work. However when in https the functions do nothing and I cannot debug it to see what's going on.

window.google.identitytoolkit.notifyFederatedSuccess({ "email": "email@domain.com", "registered": true });

does nothing. The page loads and the user as far as the site goes it logged in but the modal window is still open the the site needs to be refreshed to show that the user that they have logged in.

All window Google commands do nothing. Any idea why?

Page Code:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
     <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js"></script>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/googleapis/0.0.4/googleapis.min.js"></script>
    <script type="text/javascript" src="https://ajax.googleapis.com/jsapi"></script>
    <script type="text/javascript">           
        google.load("identitytoolkit", "1.0", {packages: ["notify"]});
    </script>

<script type="text/javascript">
window.google.identitytoolkit.notifyFederatedSuccess({ "email": "email@domain.com", "registered": true });
</script>

Solution

  • It was a huge mess using google identity toolkit to have one domain log you onto another. IE company site logging you onto product site, but it is well worth it. It involved building 2 sessioning engines.