From 5d7c1b7671f4b1eb000ef42f594648bfa41a7f9e Mon Sep 17 00:00:00 2001 From: Ashwin Kumar Date: Thu, 9 Nov 2023 15:47:43 -0800 Subject: [PATCH] Error in signInWithRedirect.ts - add AtLeastOne type to auth --- packages/core/src/singleton/Auth/types.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/core/src/singleton/Auth/types.ts b/packages/core/src/singleton/Auth/types.ts index 69d0e8fff7e..8112cd22266 100644 --- a/packages/core/src/singleton/Auth/types.ts +++ b/packages/core/src/singleton/Auth/types.ts @@ -97,12 +97,17 @@ export type AuthConfigUserAttributes = Partial< Record >; -export type AuthConfig = StrictUnion< +type AtLeastOne }> = Partial & + U[keyof U]; + +export type cognitoProviderConfig = StrictUnion< | AuthIdentityPoolConfig | AuthUserPoolConfig | AuthUserPoolAndIdentityPoolConfig >; +export type AuthConfig = AtLeastOne; + type UnionKeys = T extends T ? keyof T : never; type StrictUnionHelper = T extends any ? T & Partial, keyof T>, never>>