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 6ded23a991b..817e3ff3f9c 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 @@ -589,27 +589,16 @@ Resources: - ' let providerCredsIndex = hostedUIProviderCreds.findIndex((provider) => provider.ProviderName === providerName);' - ' let providerCreds = hostedUIProviderCreds[providerCredsIndex];' - ' let requestParams = {' + - ' ProviderDetails: {' + - ' ''client_id'': providerCreds.client_id,' + - ' ''client_secret'': providerCreds.client_secret,' + - ' ''authorize_scopes'': providerMeta.authorize_scopes' + - ' },' - ' ProviderName: providerMeta.ProviderName,' - ' UserPoolId: userPoolId,' - - ' AttributeMapping: providerMeta.AttributeMapping,' + - ' AttributeMapping: providerMeta.AttributeMapping' - ' };' - - ' let providerDetails;' - - ' if (providerMeta.ProviderName === ''SignInWithApple'') {' - - ' 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 {' - - ' providerDetails = {' - - ' ''client_id'': providerCreds.client_id,' - - ' ''client_secret'': providerCreds.client_secret,' - - ' ''authorize_scopes'': providerMeta.authorize_scopes,' - - ' };' - - ' }' - - ' return { ProviderDetails: providerDetails, ...requestParams };' + - ' return requestParams;' - ' };' - ' let createIdentityProvider = (providerName) => {' - ' let requestParams = getRequestParams(providerName);' @@ -1123,9 +1112,6 @@ Resources: <%if (props.authProviders.indexOf('www.amazon.com') !== -1) { %> www.amazon.com: !Ref amazonAppId <% } %> - <%if (props.authProviders.indexOf('appleid.apple.com') !== -1) { %> - appleid.apple.com: !Ref appleAppId - <% } %> <% } %> AllowUnauthenticatedIdentities: !Ref allowUnauthenticatedIdentities <%if (props.audiences && props.audiences.length > 0) { %> @@ -1208,8 +1194,4 @@ Outputs : AmazonWebClient: Value: !Ref amazonAppId <% } %> - <%if (props.appleAppId) { %> - AppleWebClient: - Value: !Ref appleAppId - <% } %> <% } %> diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/assets/string-maps.js b/packages/amplify-category-auth/src/provider-utils/awscloudformation/assets/string-maps.js index eb752d7c8a7..aa046254d5b 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/assets/string-maps.js +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/assets/string-maps.js @@ -136,7 +136,6 @@ const attributeProviderMap = { facebook: {}, google: {}, loginwithamazon: {}, - signinwithapple: {}, }, birthdate: { facebook: { @@ -148,7 +147,6 @@ const attributeProviderMap = { scope: 'profile', }, loginwithamazon: {}, - signinwithapple: {}, }, email: { facebook: { @@ -163,10 +161,6 @@ const attributeProviderMap = { attr: 'email', scope: 'profile', }, - signinwithapple: { - attr: 'email', - scope: 'email', - }, }, family_name: { facebook: { @@ -178,10 +172,6 @@ const attributeProviderMap = { scope: 'profile', }, loginwithamazon: {}, - signinwithapple: { - attr: 'lastName', - scope: 'name', - }, }, gender: { facebook: { @@ -193,7 +183,6 @@ const attributeProviderMap = { scope: 'profile', }, loginwithamazon: {}, - signinwithapple: {}, }, given_name: { facebook: { @@ -205,10 +194,6 @@ const attributeProviderMap = { scope: 'profile', }, loginwithamazon: {}, - signinwithapple: { - attr: 'firstName', - scope: 'name', - }, }, locale: { facebook: {}, @@ -217,7 +202,6 @@ const attributeProviderMap = { attr: 'postal_code', scope: 'postal_code', }, - signinwithapple: {}, }, middle_name: { facebook: { @@ -226,7 +210,6 @@ const attributeProviderMap = { }, google: {}, loginwithamazon: {}, - signinwithapple: {}, }, name: { facebook: { @@ -241,13 +224,11 @@ const attributeProviderMap = { attr: 'name', scope: 'profile', }, - signinwithapple: {}, }, nickname: { facebook: {}, google: {}, loginwithamazon: {}, - signinwithapple: {}, }, phone_number: { facebook: {}, @@ -256,7 +237,6 @@ const attributeProviderMap = { scope: 'profile', }, loginwithamazon: {}, - signinwithapple: {}, }, picture: { facebook: { @@ -268,31 +248,26 @@ const attributeProviderMap = { scope: 'profile', }, loginwithamazon: {}, - signinwithapple: {}, }, preferred_username: { facebook: {}, google: {}, loginwithamazon: {}, - signinwithapple: {}, }, profile: { facebook: {}, google: {}, loginwithamazon: {}, - signinwithapple: {}, }, zoneinfo: { facebook: {}, google: {}, loginwithamazon: {}, - signinwithapple: {}, }, website: { facebook: {}, google: {}, loginwithamazon: {}, - signinwithapple: {}, }, username: { facebook: { @@ -307,7 +282,6 @@ const attributeProviderMap = { attr: 'user_id', scope: 'profile:user_id', }, - signinwithapple: {}, }, updated_at: { facebook: { @@ -316,7 +290,6 @@ const attributeProviderMap = { }, google: {}, loginwithamazon: {}, - signinwithapple: {}, }, }; @@ -419,11 +392,6 @@ const authProviders = [ value: 'www.amazon.com', answerHashKey: 'amazonAppId', }, - { - name: 'Apple', - value: 'appleid.apple.com', - answerHashKey: 'appleAppId', - }, ]; const hostedUIProviders = [ @@ -439,10 +407,6 @@ const hostedUIProviders = [ name: 'Login With Amazon', value: 'LoginWithAmazon', }, - { - name: 'Sign in with Apple', - value: 'SignInWithApple', - }, ]; const authorizeScopes = [ diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/constants.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/constants.ts index b1872b61c2d..861bda0ce4a 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/constants.ts +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/constants.ts @@ -19,10 +19,6 @@ export const ENV_SPECIFIC_PARAMS = [ 'amazonAppId', 'loginwithamazonAppIdUserPool', 'loginwithamazonAppSecretUserPool', - 'signinwithappleClientIdUserPool', - 'signinwithappleTeamIdUserPool', - 'signinwithappleKeyIdUserPool', - 'signinwithapplePrivateKeyUserPool', 'hostedUIProviderCreds', ]; @@ -59,10 +55,6 @@ export const privateKeys = [ 'loginwithamazonAppIdUserPool', 'loginwithamazonAuthorizeScopes', 'loginwithamazonAppSecretUserPool', - 'signinwithappleClientIdUserPool', - 'signinwithappleTeamIdUserPool', - 'signinwithappleKeyIdUserPool', - 'signinwithapplePrivateKeyUserPool', 'CallbackURLs', 'LogoutURLs', 'AllowedOAuthFlows', diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/index.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/index.ts index dd89637906c..a7b88f089d0 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/index.ts +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/index.ts @@ -27,7 +27,7 @@ import { importMessages } from './messages'; import uuid from 'uuid'; // Currently the CLI only supports the output generation of these providers -const supportedIdentityProviders = ['COGNITO', 'Facebook', 'Google', 'LoginWithAmazon', 'SignInWithApple']; +const supportedIdentityProviders = ['COGNITO', 'Facebook', 'Google', 'LoginWithAmazon']; export const importResource = async ( context: $TSContext, @@ -752,9 +752,6 @@ const createMetaOutput = (answers: ImportAnswers, hasOAuthConfig: boolean): Meta case 'accounts.google.com': output.GoogleWebClient = answers.identityPool!.SupportedLoginProviders![key]; break; - case 'appleid.apple.com': - output.AppleWebClient = answers.identityPool!.SupportedLoginProviders![key]; - break; default: // We don't do anything with the providers that the CLI currently does not support. break; @@ -818,9 +815,6 @@ const createEnvSpecificResourceParameters = ( case 'graph.facebook.com': envSpecificResourceParameters.facebookAppId = answers.identityPool!.SupportedLoginProviders![key]; break; - case 'appleid.apple.com': - envSpecificResourceParameters.appleAppId = answers.identityPool!.SupportedLoginProviders![key]; - break; case 'accounts.google.com': { switch (projectType) { case 'javascript': @@ -846,23 +840,11 @@ const createEnvSpecificResourceParameters = ( }; const createOAuthCredentials = (identityProviders: IdentityProviderType[]): string => { - const credentials = identityProviders.map(idp => { - if (idp.ProviderName === 'SignInWithApple') { - return { - ProviderName: idp.ProviderName!, - client_id: idp.ProviderDetails!.client_id, - team_id: idp.ProviderDetails!.team_id, - key_id: idp.ProviderDetails!.key_id, - private_key: idp.ProviderDetails!.private_key, - }; - } else { - return { - ProviderName: idp.ProviderName!, - client_id: idp.ProviderDetails!.client_id, - client_secret: idp.ProviderDetails!.client_secret, - }; - } - }); + const credentials = identityProviders.map(idp => ({ + ProviderName: idp.ProviderName!, + client_id: idp.ProviderDetails!.client_id, + client_secret: idp.ProviderDetails!.client_secret, + })); return JSON.stringify(credentials); }; diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/types.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/types.ts index a05f3ab1baa..6fb82c39d19 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/types.ts +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/types.ts @@ -44,7 +44,6 @@ export type MetaOutput = { AmazonWebClient?: string; FacebookWebClient?: string; GoogleWebClient?: string; - AppleWebClient?: string; HostedUIDomain?: string; OAuthMetadata?: string; CreatedSNSRole?: string; @@ -60,7 +59,6 @@ export type EnvSpecificResourceParameters = { identityPoolName?: string; facebookAppId?: string; amazonAppId?: string; - appleAppId?: string; googleIos?: string; googleAndroid?: string; googleClientId?: string; diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/index.js b/packages/amplify-category-auth/src/provider-utils/awscloudformation/index.js index 232c11b657d..4a4251d7a46 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/index.js +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/index.js @@ -217,15 +217,8 @@ function getOAuthProviderKeys(currentEnvSpecificValues, resourceParams) { const configuredProviders = JSON.parse(hostedUIProviderCreds).map(h => h.ProviderName); const deltaProviders = _.intersection(oAuthProviders, configuredProviders); deltaProviders.forEach(d => { - if (d === 'SignInWithApple') { - currentEnvSpecificValues[`${d.toLowerCase()}ClientIdUserPool`] = configuredProviders[`${d.toLowerCase()}ClientIdUserPool`]; - currentEnvSpecificValues[`${d.toLowerCase()}TeamIdUserPool`] = configuredProviders[`${d.toLowerCase()}TeamIdUserPool`]; - currentEnvSpecificValues[`${d.toLowerCase()}KeyIdUserPool`] = configuredProviders[`${d.toLowerCase()}KeyIdUserPool`]; - currentEnvSpecificValues[`${d.toLowerCase()}PrivateKeyUserPool`] = configuredProviders[`${d.toLowerCase()}PrivateKeyUserPool`]; - } else { - currentEnvSpecificValues[`${d.toLowerCase()}AppIdUserPool`] = configuredProviders[`${d.toLowerCase()}AppIdUserPool`]; - currentEnvSpecificValues[`${d.toLowerCase()}AppSecretUserPool`] = configuredProviders[`${d.toLowerCase()}AppSecretUserPool`]; - } + currentEnvSpecificValues[`${d.toLowerCase()}AppIdUserPool`] = configuredProviders[`${d.toLowerCase()}AppIdUserPool`]; + currentEnvSpecificValues[`${d.toLowerCase()}AppSecretUserPool`] = configuredProviders[`${d.toLowerCase()}AppSecretUserPool`]; }); return currentEnvSpecificValues; } @@ -256,34 +249,15 @@ function formatCredsforEnvParams(currentEnvSpecificValues, result, resourceParam function parseCredsForHeadless(mergedValues, envParams) { const oAuthProviders = JSON.parse(mergedValues.hostedUIProviderMeta).map(h => h.ProviderName); envParams.hostedUIProviderCreds = JSON.stringify( - oAuthProviders.map(el => { - if (el === 'SignInWithApple') { - return { - ProviderName: el, - client_id: mergedValues[`${el.toLowerCase()}ClientIdUserPool`], - team_id: mergedValues[`${el.toLowerCase()}TeamIdUserPool`], - key_id: mergedValues[`${el.toLowerCase()}KeyIdUserPool`], - private_key: mergedValues[`${el.toLowerCase()}PrivateKeyUserPool`], - }; - } else { - return { - ProviderName: el, - client_id: mergedValues[`${el.toLowerCase()}AppIdUserPool`], - client_secret: mergedValues[`${el.toLowerCase()}AppSecretUserPool`], - }; - } - }), + oAuthProviders.map(el => ({ + ProviderName: el, + client_id: mergedValues[`${el.toLowerCase()}AppIdUserPool`], + client_secret: mergedValues[`${el.toLowerCase()}AppSecretUserPool`], + })), ); oAuthProviders.forEach(i => { - if (i === 'SignInWithApple') { - delete envParams[`${i.toLowerCase()}ClientIdUserPool`]; - delete envParams[`${i.toLowerCase()}TeamIdUserPool`]; - delete envParams[`${i.toLowerCase()}KeyIdUserPool`]; - delete envParams[`${i.toLowerCase()}PrivateKeyUserPool`]; - } else { - delete envParams[`${i.toLowerCase()}AppIdUserPool`]; - delete envParams[`${i.toLowerCase()}AppSecretUserPool`]; - } + delete envParams[`${i.toLowerCase()}AppIdUserPool`]; + delete envParams[`${i.toLowerCase()}AppSecretUserPool`]; }); } @@ -306,24 +280,14 @@ function getRequiredParamsForHeadlessInit(projectType, previousValues) { if (previousValues.authProviders.includes('www.amazon.com')) { requiredParams.push('amazonAppId'); } - if (previousValues.authProviders.includes('appleid.apple.com')) { - requiredParams.push('appleAppId'); - } } if (previousValues.hostedUIProviderMeta) { const oAuthProviders = JSON.parse(previousValues.hostedUIProviderMeta).map(h => h.ProviderName); if (oAuthProviders && oAuthProviders.length > 0) { oAuthProviders.forEach(o => { - if (o === 'SignInWithApple') { - requiredParams.push(`${o.toLowerCase()}ClientIdUserPool`); - requiredParams.push(`${o.toLowerCase()}TeamIdUserPool`); - requiredParams.push(`${o.toLowerCase()}KeyIdUserPool`); - requiredParams.push(`${o.toLowerCase()}PrivateKeyUserPool`); - } else { - requiredParams.push(`${o.toLowerCase()}AppIdUserPool`); - requiredParams.push(`${o.toLowerCase()}AppSecretUserPool`); - } + requiredParams.push(`${o.toLowerCase()}AppIdUserPool`); + requiredParams.push(`${o.toLowerCase()}AppSecretUserPool`); }); } } diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/service-walkthrough-types.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/service-walkthrough-types.ts index a3f630bd1cf..4d0133a1c03 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/service-walkthrough-types.ts +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/service-walkthrough-types.ts @@ -50,10 +50,6 @@ export interface SocialProviderResult { googleAppSecretUserPool?: string; loginwithamazonAppIdUserPool?: string; loginwithamazonAppSecretUserPool?: string; - signinwithappleClientIdUserPool?: string; - signinwithappleTeamIdUserPool?: string; - signinwithappleKeyIdUserPool?: string; - signinwithapplePrivateKeyUserPool?: string; } export interface IdentityPoolResult { diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/service-walkthroughs/auth-questions.js b/packages/amplify-category-auth/src/provider-utils/awscloudformation/service-walkthroughs/auth-questions.js index 0ae3a0ff579..f85c2bc0f4b 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/service-walkthroughs/auth-questions.js +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/service-walkthroughs/auth-questions.js @@ -162,7 +162,6 @@ async function serviceWalkthrough(context, defaultValuesFilename, stringMapsFile delete context.updatingAuth.googleIos; delete context.updatingAuth.googleAndroid; delete context.updatingAuth.amazonAppId; - delete context.updatingAuth.appleAppId; } // formatting data for identity pool providers @@ -402,7 +401,7 @@ function identityPoolProviders(coreAnswers, projectType) { /* Format hosted UI providers data per lambda spec hostedUIProviderMeta is saved in parameters.json. - hostedUIproviderCreds is saved in deployment-secrets. + hostedUIprovierCreds is saved in deployment-secrets. */ function userPoolProviders(oAuthProviders, coreAnswers, prevAnswers) { if (coreAnswers.useDefault === 'default') { @@ -416,7 +415,7 @@ function userPoolProviders(oAuthProviders, coreAnswers, prevAnswers) { if (answers.hostedUI) { res.hostedUIProviderMeta = JSON.stringify( oAuthProviders.map(el => { - const delimmiter = ['Facebook', 'SignInWithApple'].includes(el) ? ',' : ' '; + const delimmiter = el === 'Facebook' ? ',' : ' '; const scopes = []; const maps = {}; attributesForMapping.forEach(a => { @@ -441,23 +440,11 @@ function userPoolProviders(oAuthProviders, coreAnswers, prevAnswers) { }), ); res.hostedUIProviderCreds = JSON.stringify( - oAuthProviders.map(el => { - if (el === 'SignInWithApple') { - return { - ProviderName: el, - client_id: coreAnswers[`${el.toLowerCase()}ClientIdUserPool`], - team_id: coreAnswers[`${el.toLowerCase()}TeamIdUserPool`], - key_id: coreAnswers[`${el.toLowerCase()}KeyIdUserPool`], - private_key: coreAnswers[`${el.toLowerCase()}PrivateKeyUserPool`], - }; - } else { - return { - ProviderName: el, - client_id: coreAnswers[`${el.toLowerCase()}AppIdUserPool`], - client_secret: coreAnswers[`${el.toLowerCase()}AppSecretUserPool`], - }; - } - }), + oAuthProviders.map(el => ({ + ProviderName: el, + client_id: coreAnswers[`${el.toLowerCase()}AppIdUserPool`], + client_secret: coreAnswers[`${el.toLowerCase()}AppSecretUserPool`], + })), ); } return res; @@ -531,15 +518,8 @@ function parseOAuthCreds(providers, metadata, envCreds) { try { const provider = parsedMetaData.find(i => i.ProviderName === el); const creds = parsedCreds.find(i => i.ProviderName === el); - if (el === 'SignInWithApple') { - providerKeys[`${el.toLowerCase()}ClientIdUserPool`] = creds.client_id; - providerKeys[`${el.toLowerCase()}TeamIdUserPool`] = creds.team_id; - providerKeys[`${el.toLowerCase()}KeyIdUserPool`] = creds.key_id; - providerKeys[`${el.toLowerCase()}PrivateKeyUserPool`] = creds.private_key; - } else { - providerKeys[`${el.toLowerCase()}AppIdUserPool`] = creds.client_id; - providerKeys[`${el.toLowerCase()}AppSecretUserPool`] = creds.client_secret; - } + providerKeys[`${el.toLowerCase()}AppIdUserPool`] = creds.client_id; + providerKeys[`${el.toLowerCase()}AppSecretUserPool`] = creds.client_secret; providerKeys[`${el.toLowerCase()}AuthorizeScopes`] = provider.authorize_scopes.split(','); } catch (e) { return null; diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/utils/auth-request-adaptors.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/utils/auth-request-adaptors.ts index 709611a2993..d147916eff1 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/utils/auth-request-adaptors.ts +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/utils/auth-request-adaptors.ts @@ -146,12 +146,6 @@ const socialProviderMap = ( acc.loginwithamazonAppIdUserPool = it.clientId; acc.loginwithamazonAppSecretUserPool = it.clientSecret; break; - case 'SIGN_IN_WITH_APPLE': - acc.signinwithappleClientIdUserPool = it.clientId; - acc.signinwithappleTeamIdUserPool = it.teamId; - acc.signinwithappleKeyIdUserPool = it.keyId; - acc.signinwithapplePrivateKeyUserPool = it.privateKey; - break; } return acc; }, {} as any) as SocialProviderResult; diff --git a/packages/amplify-category-auth/src/provider-utils/supported-services.ts b/packages/amplify-category-auth/src/provider-utils/supported-services.ts index d50fdf911ec..6207faf08c4 100644 --- a/packages/amplify-category-auth/src/provider-utils/supported-services.ts +++ b/packages/amplify-category-auth/src/provider-utils/supported-services.ts @@ -242,20 +242,6 @@ export const supportedServices = { }, ], }, - { - key: 'appleAppId', - prefix: - " \n You've opted to allow users to authenticate via Sign in with Apple. If you haven't already, you'll need to go to https://developer.apple.com/account/#/welcome and configure Sign in with Apple. \n", - question: 'Enter your Bundle Identifier for your identity pool: ', - required: true, - andConditions: [ - { - key: 'authProviders', - value: 'appleid.apple.com', - operator: 'includes', - }, - ], - }, { key: 'userPoolName', question: 'Please provide a name for your user pool:', @@ -322,8 +308,7 @@ export const supportedServices = { { key: 'adminQueries', question: 'Do you want to add an admin queries API?', - learnMore: - 'Admin Queries API let you perform user admin functions from your frontend. See https://docs.amplify.aws/cli/auth/admin#admin-queries-api for more.', + learnMore: 'Admin Queries API let you perform user admin functions from your frontend. See https://docs.amplify.aws/cli/auth/admin#admin-queries-api for more.', required: true, type: 'list', map: 'booleanOptions', @@ -748,7 +733,7 @@ export const supportedServices = { key: 'hostedUI', question: 'Do you want to use an OAuth flow?', learnMore: - 'When you create a user pool in Amazon Cognito and configure a domain for it, Amazon Cognito automatically provisions a hosted web UI to let you add sign-up and sign-in pages to your app. Selecting "No" will remove any existing OAuth configuration.', + 'When you create a user pool in Amazon Cognito and configure a domain for it, Amazon Cognito automatically provisions a hosted web UI to let you add sign-up and sign-in pages to your app. Selecting "No" will remove any existing OAuth configuration.', required: true, type: 'list', map: 'booleanOptions', @@ -1179,56 +1164,6 @@ export const supportedServices = { }, ], }, - { - key: 'signinwithappleClientIdUserPool', - prefix: - " \n You've opted to allow users to authenticate via Sign in with Apple. If you haven't already, you'll need to go to https://developer.apple.com/account/#/welcome and configure Sign in with Apple. \n", - question: 'Enter your Services ID for your OAuth flow: ', - required: true, - andConditions: [ - { - key: 'authProvidersUserPool', - value: 'SignInWithApple', - operator: 'includes', - }, - ], - }, - { - key: 'signinwithappleTeamIdUserPool', - question: 'Enter your Team ID for your OAuth flow: ', - required: true, - andConditions: [ - { - key: 'authProvidersUserPool', - value: 'SignInWithApple', - operator: 'includes', - }, - ], - }, - { - key: 'signinwithappleKeyIdUserPool', - question: 'Enter your Key ID for your OAuth flow: ', - required: true, - andConditions: [ - { - key: 'authProvidersUserPool', - value: 'SignInWithApple', - operator: 'includes', - }, - ], - }, - { - key: 'signinwithapplePrivateKeyUserPool', - question: 'Enter your Private Key for your OAuth flow: ', - required: true, - andConditions: [ - { - key: 'authProvidersUserPool', - value: 'SignInWithApple', - operator: 'includes', - }, - ], - }, ], cfnFilename: 'auth-template.yml.ejs', defaultValuesFilename: 'cognito-defaults.js', diff --git a/packages/amplify-console-integration-tests/__tests__/pullAndInit.test.ts b/packages/amplify-console-integration-tests/__tests__/pullAndInit.test.ts index 9cac3088dcc..7bbf3cd69ac 100644 --- a/packages/amplify-console-integration-tests/__tests__/pullAndInit.test.ts +++ b/packages/amplify-console-integration-tests/__tests__/pullAndInit.test.ts @@ -199,10 +199,6 @@ describe('amplify app console tests', () => { GOOGLE_APP_SECRET, AMAZON_APP_ID, AMAZON_APP_SECRET, - APPLE_APP_ID, - APPLE_TEAM_ID, - APPLE_KEY_ID, - APPLE_PRIVATE_KEY, } = getSocialProviders(); await initJSProjectWithProfile(projRoot, { disableAmplifyAppCreation: false, name: 'authConsoleTest', envName }); await addAuthWithDefaultSocial(projRoot, {}); @@ -230,10 +226,6 @@ describe('amplify app console tests', () => { googleAppSecretUserPool: GOOGLE_APP_SECRET, loginwithamazonAppIdUserPool: AMAZON_APP_ID, loginwithamazonAppSecretUserPool: AMAZON_APP_SECRET, - signinwithappleClientIdUserPool: APPLE_APP_ID, - signinwithappleTeamIdUserPool: APPLE_TEAM_ID, - signinwithappleKeyIdUserPool: APPLE_KEY_ID, - signinwithapplePrivateKeyUserPool: APPLE_PRIVATE_KEY, }, }); @@ -259,10 +251,6 @@ describe('amplify app console tests', () => { googleAppSecretUserPool: GOOGLE_APP_SECRET, loginwithamazonAppIdUserPool: AMAZON_APP_ID, loginwithamazonAppSecretUserPool: AMAZON_APP_SECRET, - signinwithappleClientIdUserPool: APPLE_APP_ID, - signinwithappleTeamIdUserPool: APPLE_TEAM_ID, - signinwithappleKeyIdUserPool: APPLE_KEY_ID, - signinwithapplePrivateKeyUserPool: APPLE_PRIVATE_KEY, }, }, { diff --git a/packages/amplify-e2e-core/src/categories/auth.ts b/packages/amplify-e2e-core/src/categories/auth.ts index 8d9e33530a5..a229f34df8a 100644 --- a/packages/amplify-e2e-core/src/categories/auth.ts +++ b/packages/amplify-e2e-core/src/categories/auth.ts @@ -17,10 +17,6 @@ export type AddAuthUserPoolOnlyWithOAuthSettings = AddAuthUserPoolOnlyNoOAuthSet googleAppSecret: string; amazonAppId: string; amazonAppSecret: string; - appleAppClientId: string; - appleAppTeamId: string; - appleAppKeyID: string; - appleAppPrivateKey: string; }; export type AddAuthIdentityPoolAndUserPoolWithOAuthSettings = AddAuthUserPoolOnlyWithOAuthSettings & { @@ -466,11 +462,7 @@ export function addAuthWithDefaultSocial(cwd: string, settings: any): Promise { if (!err) { @@ -536,19 +516,6 @@ export function addAuthWithDefaultSocial(cwd: string, settings: any): Promise { return new Promise((resolve, reject) => { - const { - FACEBOOK_APP_ID, - FACEBOOK_APP_SECRET, - GOOGLE_APP_ID, - GOOGLE_APP_SECRET, - AMAZON_APP_ID, - AMAZON_APP_SECRET, - APPLE_APP_ID, - APPLE_TEAM_ID, - APPLE_KEY_ID, - APPLE_PRIVATE_KEY, - } = getSocialProviders(true); - spawn(getCLIPath(), ['add', 'auth'], { cwd, stripColors: true }) .wait('Do you want to use the default authentication and security configuration?') .send(KEY_DOWN_ARROW) @@ -641,34 +608,22 @@ export function addAuthUserPoolOnly(cwd: string, settings: any): Promise { .send('a') .sendCarriageReturn() .wait('Enter your Facebook App ID for your OAuth flow') - .send(FACEBOOK_APP_ID) + .send('fbOAUTHid') .sendCarriageReturn() .wait('Enter your Facebook App Secret for your OAuth flow') - .send(FACEBOOK_APP_SECRET) + .send('fbOAUTHsecret') .sendCarriageReturn() .wait('Enter your Google Web Client ID for your OAuth flow') - .send(GOOGLE_APP_ID) + .send('googOAUTHid') .sendCarriageReturn() .wait('Enter your Google Web Client Secret for your OAuth flow') - .send(GOOGLE_APP_SECRET) + .send('googOAUTHsecret') .sendCarriageReturn() .wait('Enter your Amazon App ID for your OAuth flow') - .send(AMAZON_APP_ID) + .send('amzOAUTHid') .sendCarriageReturn() .wait('Enter your Amazon App Secret for your OAuth flow') - .send(AMAZON_APP_SECRET) - .sendCarriageReturn() - .wait('Enter your Sign in with Apple Client ID for your OAuth flow') - .send(APPLE_APP_ID) - .sendCarriageReturn() - .wait('Enter your Sign in with Apple Team ID for your OAuth flow') - .send(APPLE_TEAM_ID) - .sendCarriageReturn() - .wait('Enter your Sign in with Apple Key ID for your OAuth flow') - .send(APPLE_KEY_ID) - .sendCarriageReturn() - .wait('Enter your Sign in with Apple Private Key for your OAuth flow') - .send(APPLE_PRIVATE_KEY) + .send('amzOAUTHsecret') .sendCarriageReturn() .wait('Do you want to configure Lambda Triggers for Cognito') .send('y') @@ -809,19 +764,6 @@ export function addAuthWithGroupsAndAdminAPI(cwd: string, settings: any): Promis } export function addAuthWithMaxOptions(cwd: string, settings: any): Promise { - const { - FACEBOOK_APP_ID, - FACEBOOK_APP_SECRET, - GOOGLE_APP_ID, - GOOGLE_APP_SECRET, - AMAZON_APP_ID, - AMAZON_APP_SECRET, - APPLE_APP_ID, - APPLE_TEAM_ID, - APPLE_KEY_ID, - APPLE_PRIVATE_KEY, - } = getSocialProviders(true); - return new Promise((resolve, reject) => { spawn(getCLIPath(), ['add', 'auth'], { cwd, stripColors: true }) .wait('Do you want to use the default authentication and security configuration?') @@ -850,9 +792,6 @@ export function addAuthWithMaxOptions(cwd: string, settings: any): Promise .wait('Enter your Amazon App ID for your identity pool') .send('amazonIDPOOL') .sendCarriageReturn() - .wait('Enter your Apple App ID for your identity pool') - .send('appleIDPOOL') - .sendCarriageReturn() .wait('Please provide a name for your user pool') .sendCarriageReturn() .wait('How do you want users to be able to sign in') @@ -931,25 +870,17 @@ export function addAuthWithMaxOptions(cwd: string, settings: any): Promise .send('a') .sendCarriageReturn() .wait('Enter your Facebook App ID for your OAuth flow') - .sendLine(FACEBOOK_APP_ID) + .sendLine('fbOAUTHid') .wait('Enter your Facebook App Secret for your OAuth flow') - .sendLine(FACEBOOK_APP_SECRET) + .sendLine('fbOAUTHsecret') .wait('Enter your Google Web Client ID for your OAuth flow') - .sendLine(GOOGLE_APP_ID) + .sendLine('googOAUTHid') .wait('Enter your Google Web Client Secret for your OAuth flow') - .sendLine(GOOGLE_APP_SECRET) + .sendLine('googOAUTHsecret') .wait('Enter your Amazon App ID for your OAuth flow') - .sendLine(AMAZON_APP_ID) + .sendLine('amzOAUTHid') .wait('Enter your Amazon App Secret for your OAuth flow') - .sendLine(AMAZON_APP_SECRET) - .wait('Enter your Sign in with Apple Client ID for your OAuth flow') - .sendLine(APPLE_APP_ID) - .wait('Enter your Sign in with Apple Team ID for your OAuth flow') - .sendLine(APPLE_TEAM_ID) - .wait('Enter your Sign in with Apple Key ID for your OAuth flow') - .sendLine(APPLE_KEY_ID) - .wait('Enter your Sign in with Apple Private Key for your OAuth flow') - .sendLine(APPLE_PRIVATE_KEY) + .sendLine('amzOAUTHsecret') .wait('Do you want to configure Lambda Triggers for Cognito') .sendLine('y') .wait('Which triggers do you want to enable for Cognito') @@ -1163,14 +1094,6 @@ export function addAuthUserPoolOnlyWithOAuth(cwd: string, settings: AddAuthUserP .sendLine(settings.amazonAppId) .wait('Enter your Amazon App Secret for your OAuth flow') .sendLine(settings.amazonAppSecret) - .wait('Enter your Sign in with Apple Client ID for your OAuth flow:') - .sendLine(settings.appleAppClientId) - .wait('Enter your Sign in with Apple Team ID for your OAuth flow:') - .sendLine(settings.appleAppTeamId) - .wait('Enter your Sign in with Apple Key ID for your OAuth flow:') - .sendLine(settings.appleAppKeyID) - .wait('Enter your Sign in with Apple Private Key for your OAuth flow:') - .sendLine(settings.appleAppPrivateKey) .wait('Do you want to configure Lambda Triggers for Cognito') .sendConfirmNo() .sendEof() diff --git a/packages/amplify-e2e-core/src/utils/envVars.ts b/packages/amplify-e2e-core/src/utils/envVars.ts index 253bcf5fcda..ffee62a5f53 100644 --- a/packages/amplify-e2e-core/src/utils/envVars.ts +++ b/packages/amplify-e2e-core/src/utils/envVars.ts @@ -9,10 +9,6 @@ type SocialProviders = { GOOGLE_APP_SECRET?: string; AMAZON_APP_ID?: string; AMAZON_APP_SECRET?: string; - APPLE_APP_ID?: string; - APPLE_TEAM_ID?: string; - APPLE_KEY_ID?: string; - APPLE_PRIVATE_KEY?: string; }; type EnvironmentVariables = AWSCredentials & SocialProviders; @@ -30,26 +26,9 @@ export function getSocialProviders(getEnv: boolean = false): SocialProviders { GOOGLE_APP_SECRET: 'gglAppSecret', AMAZON_APP_ID: 'amaznAppID', AMAZON_APP_SECRET: 'amaznAppID', - APPLE_APP_ID: 'com.fake.app', - APPLE_TEAM_ID: '2QLEWNDK6K', - APPLE_KEY_ID: '2QLZXKYJ8J', - // Cognito validates the private key, this is an invalidated key. - APPLE_PRIVATE_KEY: - 'MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgIltgNsTgTfSzUadYiCS0VYtDDMFln/J8i1yJsSIw5g+gCgYIKoZIzj0DAQehRANCAASI8E0L/DhR/mIfTT07v3VwQu6q8I76lgn7kFhT0HvWoLuHKGQFcFkXXCgztgBrprzd419mUChAnKE6y89bWcNw', }; } - const { - FACEBOOK_APP_ID, - FACEBOOK_APP_SECRET, - GOOGLE_APP_ID, - GOOGLE_APP_SECRET, - AMAZON_APP_ID, - AMAZON_APP_SECRET, - APPLE_APP_ID, - APPLE_TEAM_ID, - APPLE_KEY_ID, - APPLE_PRIVATE_KEY, - }: any = getEnvVars(); + const { FACEBOOK_APP_ID, FACEBOOK_APP_SECRET, GOOGLE_APP_ID, GOOGLE_APP_SECRET, AMAZON_APP_ID, AMAZON_APP_SECRET }: any = getEnvVars(); const missingVars = []; if (!FACEBOOK_APP_ID) { @@ -70,32 +49,9 @@ export function getSocialProviders(getEnv: boolean = false): SocialProviders { if (!AMAZON_APP_SECRET) { missingVars.push('AMAZON_APP_SECRET'); } - if (!APPLE_APP_ID) { - missingVars.push('APPLE_APP_ID'); - } - if (!APPLE_TEAM_ID) { - missingVars.push('APPLE_TEAM_ID'); - } - if (!APPLE_KEY_ID) { - missingVars.push('APPLE_KEY_ID'); - } - if (!APPLE_PRIVATE_KEY) { - missingVars.push('APPLE_PRIVATE_KEY'); - } if (missingVars.length > 0) { throw new Error(`.env file is missing the following key/values: ${missingVars.join(', ')} `); } - return { - FACEBOOK_APP_ID, - FACEBOOK_APP_SECRET, - GOOGLE_APP_ID, - GOOGLE_APP_SECRET, - AMAZON_APP_ID, - AMAZON_APP_SECRET, - APPLE_APP_ID, - APPLE_TEAM_ID, - APPLE_KEY_ID, - APPLE_PRIVATE_KEY, - }; + return { FACEBOOK_APP_ID, FACEBOOK_APP_SECRET, GOOGLE_APP_ID, GOOGLE_APP_SECRET, AMAZON_APP_ID, AMAZON_APP_SECRET }; } diff --git a/packages/amplify-e2e-tests/sample.env b/packages/amplify-e2e-tests/sample.env index 6d43c33a0f0..2ab3ed3b95d 100644 --- a/packages/amplify-e2e-tests/sample.env +++ b/packages/amplify-e2e-tests/sample.env @@ -16,11 +16,6 @@ GOOGLE_APP_SECRET= AMAZON_APP_ID= AMAZON_APP_SECRET= -APPLE_APP_ID= -APPLE_TEAM_ID= -APPLE_KEY_ID= -APPLE_PRIVATE_KEY= - #Used for delete test AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= diff --git a/packages/amplify-e2e-tests/src/__tests__/import_auth_1.test.ts b/packages/amplify-e2e-tests/src/__tests__/import_auth_1.test.ts index db8900f783c..a5a0302de36 100644 --- a/packages/amplify-e2e-tests/src/__tests__/import_auth_1.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/import_auth_1.test.ts @@ -347,7 +347,7 @@ describe('auth import userpool only', () => { // Used for creating custom app clients. This should match with web app client setting for import to work const customAppClientSettings: AppClientSettings = { - supportedIdentityProviders: ['COGNITO', 'Facebook', 'Google', 'LoginWithAmazon', 'SignInWithApple'], + supportedIdentityProviders: ['COGNITO', 'Facebook', 'Google', 'LoginWithAmazon'], allowedOAuthFlowsUserPoolClient: true, callbackURLs: ['https://sin1/', 'https://sin2/'], logoutURLs: ['https://sout1/', 'https://sout2/'], diff --git a/packages/amplify-e2e-tests/src/environment/env.ts b/packages/amplify-e2e-tests/src/environment/env.ts index a02468a871e..ed3f4ad7cce 100644 --- a/packages/amplify-e2e-tests/src/environment/env.ts +++ b/packages/amplify-e2e-tests/src/environment/env.ts @@ -136,18 +136,7 @@ export function pullEnvironment(cwd: string): Promise { } export function addEnvironmentHostedUI(cwd: string, settings: { envName: string }): Promise { - const { - FACEBOOK_APP_ID, - FACEBOOK_APP_SECRET, - GOOGLE_APP_ID, - GOOGLE_APP_SECRET, - AMAZON_APP_ID, - AMAZON_APP_SECRET, - APPLE_APP_ID, - APPLE_TEAM_ID, - APPLE_KEY_ID, - APPLE_PRIVATE_KEY, - } = getSocialProviders(); + const { FACEBOOK_APP_ID, FACEBOOK_APP_SECRET, GOOGLE_APP_ID, GOOGLE_APP_SECRET, AMAZON_APP_ID, AMAZON_APP_SECRET } = getSocialProviders(); return new Promise((resolve, reject) => { spawn(getCLIPath(), ['env', 'add'], { cwd, stripColors: true }) .wait('Do you want to use an existing environment?') @@ -170,14 +159,6 @@ export function addEnvironmentHostedUI(cwd: string, settings: { envName: string .sendLine(AMAZON_APP_ID) .wait('Enter your Amazon App Secret for your OAuth flow:') .sendLine(AMAZON_APP_SECRET) - .wait('Enter your Sign in with Apple Client ID for your OAuth flow:') - .sendLine(APPLE_APP_ID) - .wait('Enter your Sign in with Apple Team ID for your OAuth flow:') - .sendLine(APPLE_TEAM_ID) - .wait('Enter your Sign in with Apple Key ID for your OAuth flow:') - .sendLine(APPLE_KEY_ID) - .wait('Enter your Sign in with Apple Private Key for your OAuth flow:') - .sendLine(APPLE_PRIVATE_KEY) .wait('Try "amplify add api" to create a backend API and then "amplify publish" to deploy everything') .run((err: Error) => { if (!err) { diff --git a/packages/amplify-e2e-tests/src/import-helpers/settings.ts b/packages/amplify-e2e-tests/src/import-helpers/settings.ts index a1eccc3c300..ade57eb7c74 100644 --- a/packages/amplify-e2e-tests/src/import-helpers/settings.ts +++ b/packages/amplify-e2e-tests/src/import-helpers/settings.ts @@ -22,17 +22,12 @@ export const createUserPoolOnlyWithOAuthSettings = (projectPrefix: string, short signInUrl2: 'https://sin2/', signOutUrl1: 'https://sout1/', signOutUrl2: 'https://sout2/', - facebookAppId: 'facebookAppId', - facebookAppSecret: 'facebookAppSecret', - googleAppId: 'googleAppId', - googleAppSecret: 'googleAppSecret', - amazonAppId: 'amazonAppId', - amazonAppSecret: 'amazonAppSecret', - appleAppClientId: 'com.fake.app', - appleAppTeamId: '2QLEWNDK6K', - appleAppKeyID: '2QLZXKYJ8J', - appleAppPrivateKey: - 'MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgIltgNsTgTfSzUadYiCS0VYtDDMFln/J8i1yJsSIw5g+gCgYIKoZIzj0DAQehRANCAASI8E0L/DhR/mIfTT07v3VwQu6q8I76lgn7kFhT0HvWoLuHKGQFcFkXXCgztgBrprzd419mUChAnKE6y89bWcNw', + facebookAppId: `facebookAppId`, + facebookAppSecret: `facebookAppSecret`, + googleAppId: `googleAppId`, + googleAppSecret: `googleAppSecret`, + amazonAppId: `amazonAppId`, + amazonAppSecret: `amazonAppSecret`, }; }; diff --git a/packages/amplify-frontend-javascript/lib/frontend-config-creator.js b/packages/amplify-frontend-javascript/lib/frontend-config-creator.js index 9522ef64fa9..f39ec02a3fe 100644 --- a/packages/amplify-frontend-javascript/lib/frontend-config-creator.js +++ b/packages/amplify-frontend-javascript/lib/frontend-config-creator.js @@ -270,12 +270,7 @@ function getCognitoConfig(cognitoResources, projectRegion) { responseType, }; - if ( - cognitoResource.output.GoogleWebClient || - cognitoResource.output.FacebookWebClient || - cognitoResource.output.AmazonWebClient || - cognitoResource.output.AppleWebClient - ) { + if (cognitoResource.output.GoogleWebClient || cognitoResource.output.FacebookWebClient || cognitoResource.output.AmazonWebClient) { idpFederation = true; } diff --git a/packages/amplify-headless-interface/schemas/auth/1/AddAuthRequest.schema.json b/packages/amplify-headless-interface/schemas/auth/1/AddAuthRequest.schema.json index 4cdb13d4dc5..5fca7a1c908 100644 --- a/packages/amplify-headless-interface/schemas/auth/1/AddAuthRequest.schema.json +++ b/packages/amplify-headless-interface/schemas/auth/1/AddAuthRequest.schema.json @@ -419,10 +419,7 @@ "description": "If defined, users will be able to login with the specified social providers.", "type": "array", "items": { - "anyOf": [ - { "$ref": "#/definitions/CognitoSocialProviderConfiguration" }, - { "$ref": "#/definitions/CognitoSignInWithAppleProviderConfiguration" } - ] + "$ref": "#/definitions/CognitoSocialProviderConfiguration" } } }, @@ -461,42 +458,6 @@ "provider" ] }, - "CognitoSignInWithAppleProviderConfiguration": { - "description": "Defines the Cognito Sign in with Apple oAuth social provider", - "type": "object", - "properties": { - "provider": { - "description": "Sign in with Apple provider name", - "enum": [ - "SIGN_IN_WITH_APPLE" - ], - "type": "string" - }, - "clientId": { - "description": "The App client ID (sometimes called app ID or service ID). Usually takes the form com.yourapp.auth", - "type": "string" - }, - "teamId": { - "description": "The Team ID", - "type": "string" - }, - "keyId": { - "description": "The key id", - "type": "string" - }, - "privateKey": { - "description": "The private key cert", - "type": "string" - } - }, - "required": [ - "clientId", - "teamId", - "keyId", - "privateKey", - "provider" - ] - }, "NoCognitoIdentityPool": { "description": "Specifies that the Cognito configuration should not include an identity pool.", "type": "object", diff --git a/packages/amplify-headless-interface/schemas/auth/1/UpdateAuthRequest.schema.json b/packages/amplify-headless-interface/schemas/auth/1/UpdateAuthRequest.schema.json index 3b147bdeb40..8786511cd82 100644 --- a/packages/amplify-headless-interface/schemas/auth/1/UpdateAuthRequest.schema.json +++ b/packages/amplify-headless-interface/schemas/auth/1/UpdateAuthRequest.schema.json @@ -370,10 +370,7 @@ "description": "If defined, users will be able to login with the specified social providers.", "type": "array", "items": { - "anyOf": [ - { "$ref": "#/definitions/CognitoSocialProviderConfiguration" }, - { "$ref": "#/definitions/CognitoSignInWithAppleProviderConfiguration" } - ] + "$ref": "#/definitions/CognitoSocialProviderConfiguration" } } } @@ -406,42 +403,6 @@ "provider" ] }, - "CognitoSignInWithAppleProviderConfiguration": { - "description": "Defines the Cognito Sign in with Apple oAuth social provider", - "type": "object", - "properties": { - "provider": { - "description": "Sign in with Apple provider name", - "enum": [ - "SIGN_IN_WITH_APPLE" - ], - "type": "string" - }, - "clientId": { - "description": "The App client ID (sometimes called app ID or service ID). Usually takes the form com.yourapp.auth", - "type": "string" - }, - "teamId": { - "description": "The Team ID", - "type": "string" - }, - "keyId": { - "description": "The key id", - "type": "string" - }, - "privateKey": { - "description": "The private key cert", - "type": "string" - } - }, - "required": [ - "clientId", - "teamId", - "keyId", - "privateKey", - "provider" - ] - }, "NoCognitoIdentityPool": { "description": "Specifies that the Cognito configuration should not include an identity pool.", "type": "object", diff --git a/packages/amplify-headless-interface/src/interface/auth/add.ts b/packages/amplify-headless-interface/src/interface/auth/add.ts index ac6c95eddaa..66a0f682cc4 100644 --- a/packages/amplify-headless-interface/src/interface/auth/add.ts +++ b/packages/amplify-headless-interface/src/interface/auth/add.ts @@ -169,7 +169,10 @@ export interface CognitoOAuthConfiguration { socialProviderConfigurations?: CognitoSocialProviderConfiguration[]; } -interface SocialProviderConfig { +/** + * Defines a Cognito oAuth social provider + */ +export interface CognitoSocialProviderConfiguration { /** * Social providers supported by Amplify and Cognito */ @@ -184,27 +187,6 @@ interface SocialProviderConfig { clientSecret: string; } -interface SignInWithAppleSocialProviderConfig { - provider: 'SIGN_IN_WITH_APPLE'; - /** - * The client ID (sometimes called apple services ID) configured with the provider. - */ - clientId: string; - - teamId: string; - /** - * The key ID (sometimes called apple private key ID) configured with the provider. - */ - keyId: string; - - privateKey: string; -} - -/** - * Defines a Cognito oAuth social provider - */ -export type CognitoSocialProviderConfiguration = SocialProviderConfig | SignInWithAppleSocialProviderConfig; - export interface CognitoPasswordPolicy { minimumLength?: number; additionalConstraints?: CognitoPasswordConstraint[]; diff --git a/yarn.lock b/yarn.lock index 6005946390a..32be6413219 100644 --- a/yarn.lock +++ b/yarn.lock @@ -87,10 +87,10 @@ "@aws-amplify/api-graphql" "^1.2.5" "@aws-amplify/api-rest" "^1.2.5" -"@aws-amplify/appsync-modelgen-plugin@1.23.1": - version "1.23.1" - resolved "https://registry.yarnpkg.com/@aws-amplify/appsync-modelgen-plugin/-/appsync-modelgen-plugin-1.23.1.tgz#58e143a88fac10c36c93dba6739df4a5c02363d3" - integrity sha512-Ydo+KUEuDtw72dH/8oWMsF16eT/gTlqTBg5TqOH3D8AZRPcu9kWl3VP9WcXeoFNXBX/P6iVlGUHruvKzS1wCDg== +"@aws-amplify/appsync-modelgen-plugin@1.22.10": + version "1.22.10" + resolved "https://registry.yarnpkg.com/@aws-amplify/appsync-modelgen-plugin/-/appsync-modelgen-plugin-1.22.10.tgz#f4ffc4543e96672c8a60152195a7cd97094084f3" + integrity sha512-FtncIYSeCAvOtMi45PKIB20DlpzEdW20NzTy/OGza3iNb6VPK7EEar+ZslxPOcMPK9ZSUD/eB4scK9ufKLfTCw== dependencies: "@graphql-codegen/plugin-helpers" "^1.12.2" "@graphql-codegen/visitor-plugin-common" "1.12.2" @@ -7813,11 +7813,11 @@ amdefine@>=0.0.4: integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= amplify-codegen@^2.23.1: - version "2.24.2" - resolved "https://registry.yarnpkg.com/amplify-codegen/-/amplify-codegen-2.24.2.tgz#29711319e58c402395873f6972d032947e252d51" - integrity sha512-JIYvJ/VKCzkAAHm/hr65N7n06vP8+wryBYHQF88+yBk3QqHiHmPSFHGgejYyE1AL7MOH3Y4Z1rw7/S89JBUpRQ== + version "2.23.1" + resolved "https://registry.yarnpkg.com/amplify-codegen/-/amplify-codegen-2.23.1.tgz#87f8b6eeb47833923aeae8978266583784e1839f" + integrity sha512-+4lIJAvRbfkmcVAwWAinpmuZjYV+DJI848/WcVxnUPOIxrNDwo8aJOauMU2FycTSRl1FoTp5qCYMemlPVm3bZg== dependencies: - "@aws-amplify/appsync-modelgen-plugin" "1.23.1" + "@aws-amplify/appsync-modelgen-plugin" "1.22.10" "@aws-amplify/graphql-docs-generator" "2.3.3" "@aws-amplify/graphql-types-generator" "2.7.3" "@graphql-codegen/core" "1.8.3" @@ -17108,11 +17108,6 @@ lodash@4.17.15: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - log-driver@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8"