aws / aws-sdk-js-v3

Modularized AWS SDK for JavaScript.
Apache License 2.0
3.05k stars 574 forks source link

Documentation for "AdminConfirmSignUpCommand" does not make sense #6208

Closed Alexandria-Davis-Ametek closed 2 months ago

Alexandria-Davis-Ametek commented 3 months ago

Describe the issue

According to the documentation, this endpoint "provides a code" that was sent earlier.

The endpoint does not appear to return a code anywhere in the response body, meaning the description of this endpoint is probably not accurate.

Is this endpoint intended to re-send a code to the user? Or does it have a different purpose?

Links

https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cognito-identity-provider/command/AdminConfirmSignUpCommand/

aBurmeseDev commented 3 months ago

Hi @Alexandria-Davis-Ametek - thanks for reaching out.

I reached out to service team (ref: P137149571) to get their input as this's more of API related question rather than SDK. While we wait for response from service team, can you please share your SDK code and what you're getting in response? Please redact all the sensitive information before doing so.

Alexandria-Davis-Ametek commented 3 months ago

Hi @aBurmeseDev,

I have not added this call to the code, partially because I could not confirm what it did, and was able to solve the problems we were having a different way. (Customers had gotten themselves locked out of Cognito by forgetting their password before completing the email verification process. I was looking for ways to fix this problem when I found this command).

The issue is here due to the "Suggest an edit" link in the documentation (linked in the issue above) pointing to this repository.

aBurmeseDev commented 3 months ago

@Alexandria-Davis-Ametek thanks for the response and I'm glad to hear that you were able to resolve the problem.

Upon communicating with service team support, API doesn't return a code in the response however, Cognito will send a code to the user via email or SMS (depends on your User Pool configuration) to confirm ownership of the email address or phone number that was provided. This is where Cognito will also send forgot password code, via email or SMS.

Also note that this's only for local Cognito users who signed up in the user pool and users who federate through an external identity provider (IdP) have already been confirmed by their IdP will not receive code.

Hope that makes sense, let me know if there's any further questions! Best, John

Alexandria-Davis-Ametek commented 3 months ago

With a little clean up, that would make a much more clear explanation for the endpoint.

Could the documentation of this endpoint be updated to state this, and include mention about whether or not it works for users who have been confirmed (with or without their emails being confirmed)?

aBurmeseDev commented 3 months ago

Totally agree with you on that part. Our SDK docs (the one you linked) are generated upstream by service docs like this one which is where the change needs to happen. You're welcome to submit feedback by clicking on the link at the bottom of the page or here.

I will also pass your feedback forward to service team internally.

github-actions[bot] commented 2 months ago

This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing.

github-actions[bot] commented 2 months ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

aBurmeseDev commented 2 weeks ago

Hi @Alexandria-Davis-Ametek - just sharing an update from docs team member that wording has been updated and you'll see the changes in next release. They've also confirmed that:

AdminConfirmSignUp doesn't require a code, it just uses admin credentials to confirm the user's sign-up.

Thanks again for your feedback! Best, John