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

fix: added Post Confirmation trigger permission from auth to Custom trigger template #7673

Closed
wants to merge 10 commits into from

Conversation

akshbhu
Copy link
Contributor

@akshbhu akshbhu commented Jul 6, 2021

Description of changes

Issue #7582 , if available

Description of how you validated changes

  • Manuel tested and e2e tests also added

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@akshbhu akshbhu requested a review from a team as a code owner July 6, 2021 17:16
@lgtm-com
Copy link

lgtm-com bot commented Jul 6, 2021

This pull request introduces 2 alerts when merging 442c8cc into 00d6676 - view on LGTM.com

new alerts:

  • 2 for Unused variable, import, function or class

@lgtm-com
Copy link

lgtm-com bot commented Jul 12, 2021

This pull request introduces 2 alerts when merging ff46fa7 into 155a071 - view on LGTM.com

new alerts:

  • 2 for Unused variable, import, function or class

packages/amplify-e2e-core/src/categories/auth.ts Outdated Show resolved Hide resolved
packages/amplify-e2e-core/src/categories/auth.ts Outdated Show resolved Hide resolved
const lambdaFunction = await getLambdaFunction(functionName, meta.providers.awscloudformation.Region);
const clients = await getUserPoolClients(id, clientIds, region);
await addUserToUserPool(id, region);
const lambdaFunction = await getLambdaFunction(functionName, region);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we invoking the PostConfirmation trigger lambda directly instead of testing it through Cognito to see if it is properly configured and working as expected? If that's the case, we need to test it end-to-end, not in isolation like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried with AdminConfirmSingup Call which calls PostConfirmation Auth Trigger , But there is no way currently as When I tried invoking though USerPool, got following errors :

AdminCreateUser -> Admin ConfirmSignUp -> error: user state is FORCE_PASSWD_CHANGE(NOT Authorized)
AdminCreateUser -> AdminSetPassword -> Admin ConfirmSignUp -> error: user state is CONFIRMED(NOT Authorized)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are creating and confirming users in the graphql e2e tests by using AmplifyJS calls, no need to admin confirm it, use the same method that client applications will use.

yarn.lock Outdated Show resolved Hide resolved
@lgtm-com
Copy link

lgtm-com bot commented Aug 16, 2021

This pull request introduces 1 alert when merging 02289a8 into 0489c7f - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

@edwardfoyle edwardfoyle linked an issue Aug 16, 2021 that may be closed by this pull request
4 tasks
@jdeeburke
Copy link

@attilah This PR solves a pretty annoying problem -- I noticed it's stalled -- what's preventing it from getting merged?

@Kirnos
Copy link

Kirnos commented Feb 22, 2022

Any update on merging this fix? This is a very annoying regression that needs to be fixed ASAP. Thanks.

@akshbhu akshbhu force-pushed the trigger_perms branch 2 times, most recently from a036123 to b9afcc2 Compare June 3, 2022 16:50
@lgtm-com
Copy link

lgtm-com bot commented Jun 3, 2022

This pull request introduces 2 alerts when merging b9afcc2 into 6db6d66 - view on LGTM.com

new alerts:

  • 2 for Unused variable, import, function or class

@lgtm-com
Copy link

lgtm-com bot commented Jun 6, 2022

This pull request introduces 1 alert when merging efe3177 into 1539b24 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

@akshbhu
Copy link
Contributor Author

akshbhu commented Dec 5, 2022

closing in favour of #11482

@akshbhu akshbhu closed this Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cognito Trigger templates' return and permissions issue
5 participants