-
Notifications
You must be signed in to change notification settings - Fork 816
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: add HostedUIProvider dependency to OAuth Custom Lambda #9878
Conversation
expect( | ||
cognitoStack | ||
.oAuthCustomResource!.node!.dependencies!.map((dep: any) => dep.target.logicalId) | ||
.map(logicalIdToken => /testCognitoStack\.([^\.]+)\.Default/.exec(logicalIdToken)![1]), |
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.
nit: move this to a named function for readability
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.
LGTM,
just some nits
this.oAuthCustomResource.node.addDependency(this.hostedUICustomResourceInputs!.node!.defaultChild!); | ||
this.oAuthCustomResource.node.addDependency(this.hostedUIProvidersCustomResourceInputs!.node!.defaultChild!); |
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.
nit:Can we throw an exception here if this.hostedUIProvidersCustomResourceInputs ..defaultChild is falsey
👋 Hi, this pull request was referenced in the v7.6.23 release! Check out the release notes here https://github.com/aws-amplify/amplify-cli/releases/tag/v7.6.23. |
Description of changes
Adds a dependency from the oAuthCustomResource to the hostedUIProvidersCustomResource. The lack of this dependency caused push failures when updating oAuth config with a new provider as the new provider was not added before attempting to update the provider config.
Also removed some unused method parameters and fixed a class name typo.
Issue #, if available
fixes #7388
Description of how you validated changes
Manually verified and added a unit test
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.