Skip to content

Commit

Permalink
fix(amplify-category-auth): removes deprecated props for external auth (
Browse files Browse the repository at this point in the history
#2587)

fix(#2309) deprecated params are also reflected in the template
  • Loading branch information
haverchuck authored and SwaySway committed Oct 18, 2019
1 parent c8ae475 commit 08c0c70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/amplify-category-auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const {
saveResourceParameters,
ENV_SPECIFIC_PARAMS,
migrate,
removeDeprecatedProps,
} = require('./provider-utils/awscloudformation');

// this function is being kept for temporary compatability.
Expand Down Expand Up @@ -110,12 +111,13 @@ async function externalAuthEnable(context, externalCategory, resourceName, requi
}); //eslint-disable-line
/* eslint-enable */
const { roles } = defaults;
const authProps = {
let authProps = {
...authPropsValues,
...roles,
};

try {
authProps = removeDeprecatedProps(authProps);
await copyCfnTemplate(context, category, authProps, cfnFilename);
saveResourceParameters(context, provider, category, authProps.resourceName, authProps, ENV_SPECIFIC_PARAMS);
if (!authExists) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ function removeDeprecatedProps(props) {
if (props.openIdRolePolicy) {
delete props.openIdRolePolicy;
}
if (props.openIdRopenIdLambdaIAMPolicyolePolicy) {
if (props.openIdLambdaIAMPolicy) {
delete props.openIdLambdaIAMPolicy;
}
if (props.openIdLogPolicy) {
Expand Down Expand Up @@ -617,4 +617,5 @@ module.exports = {
migrate,
console,
getPermissionPolicies,
removeDeprecatedProps,
};

0 comments on commit 08c0c70

Please sign in to comment.