-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
feat(cognito): added verified attribute changes #21180
Conversation
3dd28ed
to
b9e260a
Compare
I was unable to find out how to run the tests locally, can someone support me with it? |
Sure! It's a bit tricky to find, but this section describes it https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md#build |
ac540d4
to
0a12110
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! 😃
There are a few issues to address. But feel free to ignore my style suggestion.
@mrgrain thank you for your review, I have addressed your suggestions by using constants! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻 👍🏻
@eriktisme The test failure is unrelated to your change, I'm looking into this right now. In the meantime, I think it would be good to add an explanation of this feature to the Readme - I guess it's either under Attributes or Sign In. Related to that, I'm not super familiar with Cognito. Could you explain your naming choice for |
I opted for "keepOriginal" because it is to maintain the original value of the attribute until the new value is verified. This can be found in step 4 in the Cognito documentation "Choose Keep original attribute value active when an update is pending" at page https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-email-phone-verification.html?icmpid=docs_cognito_console_help_panel |
Thanks for the documentation, it reads great! I have resolved the issue causing the build to fail. You will have to rebase/merge this branch with latest changes from |
9d4a81f
to
2b787bb
Compare
@mrgrain do you know how to get the PR Linter to succeed? |
@eriktisme Ah yes, it also needs integration tests to be updated to make sure the resource still deploys. You can find details on how to run integration tests here: https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md |
@@ -27,6 +27,10 @@ const userpool = new UserPool(stack, 'myuserpool', { | |||
email: true, | |||
phone: true, | |||
}, | |||
keepOriginal: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating this will require an update to the expected output file as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Updated the snapshot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to my last comment, please review the PR section of our contributing guide and edit the PR title and body accordingly.
c92de19
to
9d4a81f
Compare
Pull request has been modified.
Thank you for your feedback! I have updated the title and the body, I hope it is more clear now and follows the guideline |
e21755d
to
ad7af53
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Added the configuration to keep the original attributes until they are verified to improve the security of the users. closes aws#21179 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Added the configuration to keep the original attributes until they are verified to improve the security of the users.
closes #21179
All Submissions:
Adding new Unconventional Dependencies:
New Features
yarn integ
to deploy the infrastructure and generate the snapshot (i.e.yarn integ
without--dry-run
)?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license