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

Inconsistent CodeDeliveryDetails usage. #5029

Closed
mousedownmike opened this issue Mar 3, 2020 · 2 comments · Fixed by #5112
Closed

Inconsistent CodeDeliveryDetails usage. #5029

mousedownmike opened this issue Mar 3, 2020 · 2 comments · Fixed by #5112
Labels
Auth Related to Auth components/category feature-request Request a new feature

Comments

@mousedownmike
Copy link
Contributor

Describe the bug
The return of CodeDeliveryDetails is inconsistent across Auth functions.

To Reproduce

  1. Call Auth.signUp()
  2. Observe delivery details in: response.codeDeliveryDetails note lower case code.
  3. Call Auth.resendSignUp()
  4. Observe delivery details in: Promise<string>. That string is actually JSON with CodeDeliveryDetails, note upper case Code.
  5. Call Auth.forgotPassword
  6. Observe delivery details in Promise<any> containing CodeDeliveryDetails.

Expected Behavior

CodeDeliveryDetails should be consistently accessible as CodeDeliveryDetails either as part of an ISignUpResult or a Promise<any>. This would make it consistent with the documented Forgot Password API.

Required Changes

  1. Change codeDeliveryDetails in ISignUpResult to be CodeDeliveryDetails. There seems to be some mixed case fields in there already so it doesn't look like it would break any conventions.
  2. Modify the signature of Auth.resendSignUp to return a Promise<any>.
@mousedownmike mousedownmike added the to-be-reproduced Used in order for Amplify to reproduce said issue label Mar 3, 2020
@sammartinez sammartinez added the Auth Related to Auth components/category label Mar 3, 2020
@mousedownmike
Copy link
Contributor Author

I have a revision to this. In practice it appears that Auth.resendSignUp returns a CognitoIdentityServiceProvider.ResendConfirmationCodeResponse. This makes having the response typed as string even more difficult to deal with. This should really be typed to any.

@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Auth Related to Auth components/category feature-request Request a new feature
Projects
None yet
3 participants