diff --git a/packages/amplify-category-auth/resources/cloudformation-templates/auth-template.yml.ejs b/packages/amplify-category-auth/resources/cloudformation-templates/auth-template.yml.ejs index a6b89c10c56..e3f31d0b3e1 100644 --- a/packages/amplify-category-auth/resources/cloudformation-templates/auth-template.yml.ejs +++ b/packages/amplify-category-auth/resources/cloudformation-templates/auth-template.yml.ejs @@ -594,13 +594,17 @@ Resources: - ' AttributeMapping: providerMeta.AttributeMapping,' - ' };' - ' if (providerMeta.ProviderName === ''SignInWithApple'') {' - - ' requestParams.ProviderDetails = {' - - ' ''client_id'': providerCreds.client_id,' - - ' ''team_id'': providerCreds.team_id,' - - ' ''key_id'': providerCreds.key_id,' - - ' ''private_key'': providerCreds.private_key,' - - ' ''authorize_scopes'': providerMeta.authorize_scopes,' - - ' };' + - ' if (providerCreds.client_id && providerCreds.team_id && providerCreds.key_id && providerCreds.private_key) {' + - ' requestParams.ProviderDetails = {' + - ' ''client_id'': providerCreds.client_id,' + - ' ''team_id'': providerCreds.team_id,' + - ' ''key_id'': providerCreds.key_id,' + - ' ''private_key'': providerCreds.private_key,' + - ' ''authorize_scopes'': providerMeta.authorize_scopes,' + - ' };' + - ' } else {' + - ' requestParams = null;' + - ' }' - ' } else {' - ' requestParams.ProviderDetails = {' - ' ''client_id'': providerCreds.client_id,' @@ -612,11 +616,17 @@ Resources: - ' };' - ' let createIdentityProvider = (providerName) => {' - ' let requestParams = getRequestParams(providerName);' + - ' if (!requestParams) {' + - ' return Promise.resolve();' + - ' }' - ' requestParams.ProviderType = requestParams.ProviderName;' - ' return identity.createIdentityProvider(requestParams).promise();' - ' };' - ' let updateIdentityProvider = (providerName) => {' - ' let requestParams = getRequestParams(providerName);' + - ' if (!requestParams) {' + - ' return Promise.resolve();' + - ' }' - ' return identity.updateIdentityProvider(requestParams).promise();' - ' };' - ' let deleteIdentityProvider = (providerName) => {'