Skip to content

fix: cli throws an error when thirdPartyAuth is enabled, but authProvider is not included#14284

Merged
otaviomacedo merged 1 commit intodevfrom
otaviom/empty-auth-providers
Oct 21, 2025
Merged

fix: cli throws an error when thirdPartyAuth is enabled, but authProvider is not included#14284
otaviomacedo merged 1 commit intodevfrom
otaviom/empty-auth-providers

Conversation

@otaviomacedo
Copy link
Copy Markdown
Contributor

The function that loads the awscloudformation provider assumes that the authProviders property is present whenever thirdPartyAuth is present. This object comes from a user controlled file (parameter.json in the application resource dir), so there is no guarantee that this is true.

Default to an empty array if it's not present.

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

@otaviomacedo otaviomacedo requested a review from a team as a code owner October 17, 2025 10:49
Comment thread packages/amplify-category-auth/src/provider-utils/awscloudformation/index.ts Dismissed
Comment thread packages/amplify-category-auth/src/provider-utils/awscloudformation/index.ts Dismissed
Comment thread packages/amplify-category-auth/src/provider-utils/awscloudformation/index.ts Dismissed
Comment thread packages/amplify-category-auth/src/provider-utils/awscloudformation/index.ts Dismissed
Copy link
Copy Markdown
Contributor

@ShadowCat567 ShadowCat567 left a comment

Choose a reason for hiding this comment

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

Considering the previous cli maintainers used this includes('accounts.google.com') previously, I'm not too concerned about these CodeQL errors.

@otaviomacedo otaviomacedo merged commit 65d1171 into dev Oct 21, 2025
5 checks passed
@otaviomacedo otaviomacedo deleted the otaviom/empty-auth-providers branch October 21, 2025 13:21
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.

3 participants