title: AWS Cognito: getting "Please provide a valid public provider" with google
body: <p>I'm getting 400 "Please provide a valid public provider" when I try to set the google access token like this:</p>
  
  <pre><code>AWS.config.update(
  {
      region: window.region,
      credentials: new AWS.CognitoIdentityCredentials(
      {
          IdentityPoolId: window.identityPoolId,
          Logins:
          {
              'accounts.google.com': gapi.auth2.getAuthInstance().currentUser.get().getAuthResponse().id_token
          }
      })
  });
  </code></pre>
  
  <p>Cognito is inited like this:</p>
  
  <pre><code>window.region = Pointer_stringify(region);
  window.identityPoolId = 'us-east-1:xxxxxxxx-xxxx-xxxx-xxxx-xxxx';
  var po = document.createElement('script');
  po.type = 'text/javascript';
  po.async = true;
  po.src = '/aws-sdk.min.js';
  po.onload = function()
  {
      var po2 = document.createElement('script');
      po2.type = 'text/javascript';
      po2.async = true;
      po2.src = '/amazon-cognito.min.js';
      po2.onload = function()
      {
          AWS.config.region = window.region; // Region
          AWS.config.credentials = new AWS.CognitoIdentityCredentials(
          {
              IdentityPoolId: window.identityPoolId,
          });
      }
      var s2 = document.getElementsByTagName('script')[0];
      s2.parentNode.insertBefore(po2, s2);
  }
  var s = document.getElementsByTagName('script')[0];
  s.parentNode.insertBefore(po, s);
  </code></pre>
  
  <p>I have the google client id added to the Google+ tab of Authention providers and accounts.google.com added to OpenID tab.
  This only happens with Google, it works with Facebook.</p>