Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cognito admin_create_user API param username need to align with sign in options #3836

Closed
KnightArthurRen opened this issue Aug 25, 2023 · 3 comments
Labels
api-documentation documentation This is a problem with documentation. p2 This is a standard priority issue

Comments

@KnightArthurRen
Copy link

Describe the issue

The docs on the admin_create_user only says Username param should be a UTF-8 string. However when I was trying it out, this only hold true if your user pool have user name sign in options. On my case the user pool only have email option so if you pass anything else other than a email I got

botocore.errorfactory.InvalidParameterException: An error occurred (InvalidParameterException) when calling the AdminCreateUser operation: Username should be an email.

I just think it's kind of ambiguous on what exactly does Username param refer to as in email sign in option the "username" of a given user is actually the sub while the Username in API is actually the email.

Thank you!

Links

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cognito-idp/client/admin_create_user.html

@KnightArthurRen KnightArthurRen added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Aug 25, 2023
@indrora indrora added api-documentation p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Aug 25, 2023
@indrora
Copy link

indrora commented Aug 25, 2023

This is a common confusion on Cognito user pools, and you're right it should be updated in the documentation.

@indrora
Copy link

indrora commented Aug 25, 2023

Since this is an issue in the service documentation, the best way to do provide feedback to the team responsible (apologies that this is a fragmented portion of our system) is to provide feedback on the raw API documentation: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminInitiateAuth.html (select the "Feedback" button in the upper corner)

@indrora indrora closed this as completed Aug 25, 2023
@KnightArthurRen
Copy link
Author

Ah awesome sorry for the late reply thanks Indrora!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-documentation documentation This is a problem with documentation. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

2 participants