Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Rename endpoint to userPoolEndpoint #12276

Merged
merged 8 commits into from
Oct 16, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`
);
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
Loading