Check if a username exists in Cognito User pool

Viewed 565

i want to my flow authentication meet these scenarios : check username exist if exist then navigate to screen signIn otherwise signUp. I cannot find documentation on how to check a username using AWS Cognito

1 Answers

You can use adminGetUser to pass the username and user pool id. If the user exists you will get a 200 success response. Just put an if condition based on the response.

Related