title: AWS Cognito - resendConfirmationCode 'User is already confirmed.'
body: <p>We have a scenario where a user forgets their username or password and can click on a <em>'Forgot password'</em> link, receiving a confirmation code in an SMS (via Cognito's <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ForgotPassword.html" rel="nofollow noreferrer"><code>ForgotPassword</code></a>).</p>
  
  <p>If, for some reason, the user doesn't receive the SMS, they can click on <em>'Resend code'</em> link which will execute Cognito's <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ResendConfirmationCode.html" rel="nofollow noreferrer"><code>ResendConfirmationCode</code></a>.</p>
  
  <p>The result from the POST request is a 400 containing the following:
  <code>{"__type":"InvalidParameterException","message":"User is already confirmed."}</code></p>
  
  <p>How can the user be confirmed when they have requested their confirmation code? Any clarification into the cause of this issue would be much appreciated.</p>