title: AWS Cognito not always called when the user logs in
body: <p>In my Android app, I use AWS Cognito to allow my users to authenticate, by doing the following:</p>
  
  <pre class="lang-java prettyprint-override"><code>AWSMobileClient.getInstance().signIn("email@demo.com", "password", null, callback);
  </code></pre>
  
  <p>It works great, but I have a problem: I have a Post Authentication trigger in Cognito that needs to be run each and every time a user logs in. And I found out that in a very specific situation, Cognito is not always called by <code>AWSMobileClient.getInstance().signIn()</code>.</p>
  
  <p>This situation is actually quite weird: when a user logs in, the app calls an API (via API Gateway and Lambda) right after the user is authenticated by Cognito. But when this API returns an error 400, then the following calls to <code>AWSMobileClient.getInstance().signIn()</code> seem to be made "locally", as if there are cached data that prevent the app from really calling Cognito (since I can, in that situation, authenticate a user while being offline).</p>
  
  <p>So how can I force the SDK to really call Cognito each and every time a user logs in?</p>
  
  <p>Thanks for your help.</p>