diff --git a/packages/amplify-frontend-android/lib/frontend-config-creator.js b/packages/amplify-frontend-android/lib/frontend-config-creator.js index 00f398c5cd2..dc224998f76 100644 --- a/packages/amplify-frontend-android/lib/frontend-config-creator.js +++ b/packages/amplify-frontend-android/lib/frontend-config-creator.js @@ -264,7 +264,7 @@ function getCognitoConfig(cognitoResources, projectRegion) { }; } - Object.assign(cognitoConfig, cognitoResource.frontEndConfig); + Object.assign(cognitoConfig.Auth.Default, cognitoResource.frontEndConfig); return cognitoConfig; } diff --git a/packages/amplify-frontend-flutter/lib/frontend-config-creator.js b/packages/amplify-frontend-flutter/lib/frontend-config-creator.js index 331eab6348f..e28c2b735d5 100644 --- a/packages/amplify-frontend-flutter/lib/frontend-config-creator.js +++ b/packages/amplify-frontend-flutter/lib/frontend-config-creator.js @@ -241,7 +241,7 @@ function getCognitoConfig(cognitoResources, projectRegion) { }; } - Object.assign(cognitoConfig, cognitoResource.frontEndConfig); + Object.assign(cognitoConfig.Auth.Default, cognitoResource.frontEndConfig); return cognitoConfig; } diff --git a/packages/amplify-frontend-ios/lib/frontend-config-creator.js b/packages/amplify-frontend-ios/lib/frontend-config-creator.js index f070e4d7975..ff54a3174ce 100644 --- a/packages/amplify-frontend-ios/lib/frontend-config-creator.js +++ b/packages/amplify-frontend-ios/lib/frontend-config-creator.js @@ -246,7 +246,7 @@ function getCognitoConfig(cognitoResources, projectRegion) { }; } - Object.assign(cognitoConfig, cognitoResource.frontEndConfig); + Object.assign(cognitoConfig.Auth.Default, cognitoResource.frontEndConfig); return cognitoConfig; }