title: Using Amazon Cognito Developer Identities
body: <p>I am following amazon documentation but it doesn't work as advertised. I have the latest sdk too.  The self.identity = code below doesn't work because it is read only.</p>
  
  <pre><code>@implementation DeveloperAuthenticatedIdentityProvider
  /*
   * Use the token method to communicate with your backend to get an
   * identityId and token.
   */
  
  - (AWSTask &lt;NSString*&gt;) token {
      //Write code to call your backend:
      //Pass username/password to backend or some sort of token to authenticate user
      //If successful, from backend call getOpenIdTokenForDeveloperIdentity with logins map 
      //containing "your.provider.name":"enduser.username"
      //Return the identity id and token to client
      //You can use AWSTaskCompletionSource to do this asynchronously
  
      // Set the identity id and return the token
      self.identityId = response.identityId;
      return [AWSTask taskWithResult:response.token];
  }
  
  @end
  </code></pre>
  
  <p>How do I overright this? Thanks.</p>