title: "Forgot username" flow for AWS Cognito?
body: <p>I'm using ASW Cognito for authenticating users. Cognito has a well-documented flow to handle users who have forgotten their passwords. </p>
  
  <p>How do I handle users who have forgotten their usernames? Is there a built-in flow that lets the user enter their email or phone number, and then receive an email or text with their associated username? I found the <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListUsers.html" rel="nofollow noreferrer">ListUser API</a>, which returns all the users in a userpool. I could write a Lambda function that filters through all my users, looking for a match on email or phone number. But this seems like overkill.</p>