title: AWS: Error when calling getCredentialsForIdentity()
body: <p>I am trying to get a login procedure to work in AWS by following the Enhanced Authflow for Developer Authentication mentioned in the <a href="http://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flow.html" rel="nofollow">official documentation</a>.</p>
  
  <p>The code in both client and server are using JavaScript, and I'm using Node.js on the server-side.</p>
  
  <p>I have managed to get the OpenId token back to the client but when I try to exchange it for credentials by calling <code>getCredentialsForIdentity()</code>, the client receives this error:</p>
  
  <blockquote>
    <p>NotAuthorizedException: Access to Identity 'eu-west-1:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' is forbidden.</p>
  </blockquote>
  
  <p>Also on the server-side when I print the variable holding my <code>AWS.CognitoIdentity</code> object and check the property <code>cognitoidentity.config.credentialProvider</code> all I get is:</p>
  
  <pre><code>{"providers":[null,null,null,null]}
  </code></pre>
  
  <p>It feels like the named custom developer provider I have associated with my identity pool should be in there but I seem to not be able to get it there.</p>
  
  <p>Any thoughts on where I might have gone wrong?</p>