Skip to content

Commit

Permalink
feat: Rename endpoint to userPoolEndpoint (aws-amplify#12276)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimblanc authored and cshfang committed Oct 16, 2023
1 parent 559fbcf commit 63044e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`
);
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/singleton/Auth/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
};

Expand All @@ -137,6 +137,7 @@ export type AuthUserPoolConfig = {
export type CognitoUserPoolConfig = {
userPoolClientId: string;
userPoolId: string;
userPoolEndpoint?: string;
signUpVerificationMethod?: 'code' | 'link';
loginWith?: {
oauth?: OAuthConfig;
Expand All @@ -157,7 +158,6 @@ export type CognitoUserPoolConfig = {
requireNumbers?: boolean;
requireSpecialCharacters?: boolean;
};
endpoint?: string;
};

export type OAuthConfig = {
Expand Down

0 comments on commit 63044e9

Please sign in to comment.