From 63044e9664a4d478a52acf8d8d04f3a9bcbd6b94 Mon Sep 17 00:00:00 2001 From: Jim Blanchard Date: Mon, 16 Oct 2023 09:47:18 -0500 Subject: [PATCH] feat: Rename `endpoint` to `userPoolEndpoint` (#12276) --- .../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 1a06002762a..21a96c4d429 100644 --- a/packages/auth/src/providers/cognito/utils/clients/CognitoIdentityProvider/base.ts +++ b/packages/auth/src/providers/cognito/utils/clients/CognitoIdentityProvider/base.ts @@ -31,7 +31,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 AmplifyUrl( `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 = {