From 5574b2ec629f994836070d78d3f21209c87f225a Mon Sep 17 00:00:00 2001 From: Jim Blanchard Date: Thu, 12 Oct 2023 12:01:34 -0500 Subject: [PATCH] feat: Rename `endpoint` to `userPoolEndpoint` --- .../cognito/utils/clients/CognitoIdentityProvider/base.ts | 2 +- packages/core/src/singleton/Auth/types.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/auth/src/providers/cognito/utils/clients/CognitoIdentityProvider/base.ts b/packages/auth/src/providers/cognito/utils/clients/CognitoIdentityProvider/base.ts index d053d052b6c..8e191df05c0 100644 --- a/packages/auth/src/providers/cognito/utils/clients/CognitoIdentityProvider/base.ts +++ b/packages/auth/src/providers/cognito/utils/clients/CognitoIdentityProvider/base.ts @@ -28,7 +28,7 @@ const SERVICE_NAME = 'cognito-idp'; */ const endpointResolver = ({ region }: EndpointResolverOptions) => { const authConfig = Amplify.getConfig().Auth?.Cognito; - const customURL = authConfig?.endpoint; + const customURL = authConfig?.userPoolEndpoint; const defaultURL = new URL( `https://${SERVICE_NAME}.${region}.${getDnsSuffix(region)}` ); diff --git a/packages/core/src/singleton/Auth/types.ts b/packages/core/src/singleton/Auth/types.ts index 13dbf435cd0..4da33321c5c 100644 --- a/packages/core/src/singleton/Auth/types.ts +++ b/packages/core/src/singleton/Auth/types.ts @@ -113,12 +113,12 @@ export type AuthIdentityPoolConfig = { Cognito: CognitoIdentityPoolConfig & { userPoolClientId?: never; userPoolId?: never; + userPoolEndpoint?: never; loginWith?: never; signUpVerificationMethod?: never; userAttributes?: never; mfa?: never; passwordFormat?: never; - endpoint?: never; }; }; @@ -137,6 +137,7 @@ export type AuthUserPoolConfig = { export type CognitoUserPoolConfig = { userPoolClientId: string; userPoolId: string; + userPoolEndpoint?: string; signUpVerificationMethod?: 'code' | 'link'; loginWith?: { oauth?: OAuthConfig; @@ -157,7 +158,6 @@ export type CognitoUserPoolConfig = { requireNumbers?: boolean; requireSpecialCharacters?: boolean; }; - endpoint?: string; }; export type OAuthConfig = {