Cognito's API ResendConfirmationCode/ConfirmSignUp param input by email or phone number, instead of username attribute only

0

how can i achieve it? any workaround or custom auth flow can do that? thank you!!!

1 Answer
0

Hello,

As you rightfully noted, the ConfirmSignUp[1] and ResendConfirmationCode[2] API operation only supports including the username at present and does not support including aliases such as the email address/phone number for the user. To be able to call the above API operations, you would need to include the actual username of the Cognito User, which would look more like a GUID/UUID instead of a name.

Having noted the above, I can confirm that an existing feature request is in place with the Service Team, to add support for including the aliases, such as the email address/phone number, in the ConfirmSignUp and ResendConfirmationCode API operation instead of the username and I have added your use-case as a +1 to the request, to help with the roll-out of the feature.

While I am unable to comment on if/when this feature may get released, I request you to keep an eye on our What's New[3] and Blog[4] pages for any new feature announcements.

As a suggested work-around, you may consider caching the UUID/Username of the user in the browser for an email in some form of cookie, as noted in the 3rd party link here[5]. However, please note that the link provided here[5], is done so on a best-effort basis, as the work-around of caching the UUID would be dependent on the application that is integrated with the Cognito Userpool and would generally involve code development.

[1] ConfirmSignUp - https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ConfirmSignUp.html

[2] ResendConfirmationCode - https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ResendConfirmationCode.html

[3] https://aws.amazon.com/new/

[4] https://aws.amazon.com/blogs/aws/

[5] https://github.com/amazon-archives/amazon-cognito-identity-js/issues/147#issuecomment-248402163

I sincerely hope this helps!

AWS
SUPPORT ENGINEER
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions