From fb8dadbfb77aecd9fe07571d1ccbd0db3b5d0c94 Mon Sep 17 00:00:00 2001 From: Ashwin Kumar Date: Mon, 2 Dec 2024 17:55:36 -0500 Subject: [PATCH] fix: amplify configure with auth userGroups (#14046) Co-authored-by: Ashwin Kumar --- packages/core/__tests__/parseAmplifyOutputs.test.ts | 2 ++ packages/core/src/singleton/AmplifyOutputs/types.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/core/__tests__/parseAmplifyOutputs.test.ts b/packages/core/__tests__/parseAmplifyOutputs.test.ts index 38a8fa141c4..9ae814334c1 100644 --- a/packages/core/__tests__/parseAmplifyOutputs.test.ts +++ b/packages/core/__tests__/parseAmplifyOutputs.test.ts @@ -133,6 +133,7 @@ describe('parseAmplifyOutputs tests', () => { unauthenticated_identities_enabled: true, mfa_configuration: 'OPTIONAL', mfa_methods: ['SMS'], + groups: [{ ADMIN: { precedence: 0 }, USER: { precedence: 0 } }], }, }; @@ -174,6 +175,7 @@ describe('parseAmplifyOutputs tests', () => { scopes: ['profile', '...'], }, }, + groups: [{ ADMIN: { precedence: 0 }, USER: { precedence: 0 } }], }, }, }); diff --git a/packages/core/src/singleton/AmplifyOutputs/types.ts b/packages/core/src/singleton/AmplifyOutputs/types.ts index a862d4e4efe..4146037a9ce 100644 --- a/packages/core/src/singleton/AmplifyOutputs/types.ts +++ b/packages/core/src/singleton/AmplifyOutputs/types.ts @@ -42,7 +42,7 @@ export interface AmplifyOutputsAuthProperties { unauthenticated_identities_enabled?: boolean; mfa_configuration?: string; mfa_methods?: string[]; - groups?: Record[]; + groups?: Partial>[]; } export interface AmplifyOutputsStorageBucketProperties {