title: How to add a logins map to CredentialsProvider?
body: <p>I have integrated my User Pools setup with the federated identity flow with the 9 steps from the <a href="http://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-integrating-user-pools-with-identity-pools.html" rel="nofollow">relevant documentation</a>. I'm following the documentation and using the enhanced auth flow. </p>
  
  <p>There is however an additional step which I cannot quite understand that is possibly causing my experienced problem with the IOS SDK. The guide mentions that: </p>
  
  <blockquote>
    <p>After the user is authenticated, add that user's identity token to the
    logins map in the credentials provider. The provider name will depend
    on your Amazon Cognito Identity user pool ID. It will have the
    following structure: cognito-idp..amazonaws.com/</p>
  </blockquote>
  
  <p>Then it offers the following IOS SDK snippet: </p>
  
  <pre><code>AWSCognitoIdentityUserPool *pool = [[AWSCognitoIdentityUserPoolalloc] initWithClientId:@"YOUR_CLIENT_ID"clientSecret:@"YOUR_CLIENT_SECRET"poolId:@"YOUR_USER_POOL_ID"];
  AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvideralloc] initWithRegionType:AWSRegionUSEast1identityPoolId:@"IDENTITY_POOL_ID"identityProviderManager:pool];
  </code></pre>
  
  <p>But from my understanding, there isn't any logins map added in the credentials provider in this piece of code. If you would look at the JavaScript and Java version you will see that this is set explicitly. After some digging around I also found a method for the IOS-SDK, namely a <em>setLogins</em> method, however this method is deprecated. Based on the documentation it would make sense that I could initiated it as follows:</p>
  
  <pre><code>[self.credentialsProvider setLogins:@{@"cognito-idp.&lt;region&gt;.amazonaws.com/&lt;YOUR_USER_POOL_ID&gt;": @"id_token"}];
  </code></pre>
  
  <p>However, this results in a depreciation warning.:</p>
  
  <pre><code>setLogins is deprecated. Use 'AWSIdentityProviderManager' to provide a valid logins dictionary to the credentials provider
  </code></pre>
  
  <p>The AWSIdentityProviderManager protocol does seem to offer a logins method, however this is not documented.</p>
  
  <p>So my question is: how could I add my logins map in my credentials provider?</p>