You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The return of CodeDeliveryDetails is inconsistent across Auth functions.
To Reproduce
Call Auth.signUp()
Observe delivery details in: response.codeDeliveryDetails note lower case code.
Call Auth.resendSignUp()
Observe delivery details in: Promise<string>. That string is actually JSON with CodeDeliveryDetails, note upper case Code.
Call Auth.forgotPassword
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
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.
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.
Describe the bug
The return of
CodeDeliveryDetails
is inconsistent across Auth functions.To Reproduce
Auth.signUp()
response.codeDeliveryDetails
note lower casecode
.Auth.resendSignUp()
Promise<string>
. Thatstring
is actually JSON withCodeDeliveryDetails
, note upper caseCode
.Auth.forgotPassword
Promise<any>
containingCodeDeliveryDetails
.Expected Behavior
CodeDeliveryDetails
should be consistently accessible asCodeDeliveryDetails
either as part of anISignUpResult
or aPromise<any>
. This would make it consistent with the documented Forgot Password API.Required Changes
codeDeliveryDetails
inISignUpResult
to beCodeDeliveryDetails
. There seems to be some mixed case fields in there already so it doesn't look like it would break any conventions.Auth.resendSignUp
to return aPromise<any>
.The text was updated successfully, but these errors were encountered: