Skip to content

Commit 925f97d

Browse files
authored
fix: use correct auth mode in data config for legacy mobile client config (#1579)
1 parent cc6c68b commit 925f97d

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.changeset/olive-boxes-stare.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@aws-amplify/client-config': patch
3+
---
4+
5+
fix: use correct auth mode in data config for legacy mobile client config

packages/client-config/src/client-config-writer/client_config_to_mobile_legacy_converter.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,14 @@ void describe('client config converter', () => {
185185
data_AWS_IAM: {
186186
ApiUrl: 'https://test_api_endpoint.amazon.com',
187187
Region: 'test_app_sync_region',
188-
AuthMode: 'API_KEY',
188+
AuthMode: 'AWS_IAM',
189189
ApiKey: 'test_api_key',
190190
ClientDatabasePrefix: 'data_AWS_IAM',
191191
},
192192
data_AMAZON_COGNITO_USER_POOLS: {
193193
ApiUrl: 'https://test_api_endpoint.amazon.com',
194194
Region: 'test_app_sync_region',
195-
AuthMode: 'API_KEY',
195+
AuthMode: 'AMAZON_COGNITO_USER_POOLS',
196196
ApiKey: 'test_api_key',
197197
ClientDatabasePrefix: 'data_AMAZON_COGNITO_USER_POOLS',
198198
},

packages/client-config/src/client-config-writer/client_config_to_mobile_legacy_converter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export class ClientConfigMobileConverter {
116116
] = {
117117
ApiUrl: clientConfig.aws_appsync_graphqlEndpoint,
118118
Region: clientConfig.aws_appsync_region,
119-
AuthMode: clientConfig.aws_appsync_authenticationType,
119+
AuthMode: additionalAuthenticationType,
120120
ApiKey: clientConfig.aws_appsync_apiKey,
121121
ClientDatabasePrefix: `data_${additionalAuthenticationType}`,
122122
};

0 commit comments

Comments
 (0)