-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fix response of the resend confirmation code request #43
Fix response of the resend confirmation code request #43
Conversation
f02d7c0
to
6a13acd
Compare
Hi @lammertw, I forgot to write a test for this, my bad! I'll merge your PR and publish a new release in the morning. Could you also make the change in the IdentityProviderJS class and write the missing test case? |
@gaebel Sure, I've fixed JS as well (basically changed it to match the forgot password response since it's the same). I'd like to add some test, however when I'm running the existing tests none of them work. Not sure if I'm missing anything. I created a new Cognito instance on AWS for this and use that when creating the IdentityProviderClient, however I'm getting this:
|
I think writable custom attributes have to be manually enabled in the user pool. |
@gaebel I finally got the tests to work. I assume you haven't documented anywhere how to exactly set up the Cognito User Pool but perhaps it's good to know for the future. So some of the things I had to do:
Because of this setup, it's not possible to add a test case for the |
Yes, that's unfortunately not documented, thanks for the writeup @lammertw – I'll add it to the Contributing.md. Oh... yeah this can't currently be tested in this repo. We're testing the confirmation requests (except |
@gaebel In PR #36 you asked me to use
CodeDeliveryDetails
as response type. However I made a mistake in the change there. Instead of wrapping theCodeDeliveryDetails
in a new response object it's trying to parse the response json (which contains looks like{"CodeDeliveryDetails":{"AttributeName":"phone_number","DeliveryMedium":"SMS","Destination":"+********0388"}}
) directly into a CodeDeliveryDetails. Which now results in an error. So this call currently always fails.I've fixed it in this PR (and would greatly appreciate it if a new release could be made with this change since we currently have the error in our app on production, tnx!)