File tree Expand file tree Collapse file tree 3 files changed +41
-2
lines changed
amplify_core/lib/src/config/auth
auth/amplify_auth_cognito_dart/lib/src Expand file tree Collapse file tree 3 files changed +41
-2
lines changed Original file line number Diff line number Diff line change @@ -133,11 +133,22 @@ class AuthConfig extends AmplifyPluginConfigMap {
133133 )
134134 : null ;
135135
136+ final endpoint = userPool? .endpoint;
137+ if (endpoint != null ) {
138+ safePrint (
139+ '📋 [Auth Config] Gen 1 config contains Endpoint: $endpoint ' ,
140+ );
141+ } else {
142+ safePrint (
143+ '📋 [Auth Config] No Endpoint found in Gen 1 config' ,
144+ );
145+ }
146+
136147 return AuthOutputs (
137148 awsRegion: region,
138149 userPoolId: userPool? .poolId,
139150 userPoolClientId: userPool? .appClientId,
140- userPoolEndpoint: userPool ? . endpoint,
151+ userPoolEndpoint: endpoint,
141152 appClientSecret: userPool? .appClientSecret,
142153 identityPoolId: identityPool? .poolId,
143154 passwordPolicy: passwordPolicy,
Original file line number Diff line number Diff line change @@ -189,7 +189,23 @@ class WrappedCognitoIdentityProviderClient
189189 WithHeader (AWSHeaders .cacheControl, 'no-store' ),
190190 ],
191191 ),
192- _dependencyManager = dependencyManager;
192+ _dependencyManager = dependencyManager {
193+ // Log the actual baseUri being used
194+ final baseUri = endpoint == null
195+ ? null
196+ : (endpoint.startsWith ('http' )
197+ ? Uri .parse (endpoint)
198+ : Uri .parse ('https://$endpoint ' ));
199+ if (baseUri != null ) {
200+ safePrint (
201+ '🌐 [Cognito SDK] Using custom baseUri: $baseUri ' ,
202+ );
203+ } else {
204+ safePrint (
205+ '🌐 [Cognito SDK] Using default AWS Cognito endpoint for region: $region ' ,
206+ );
207+ }
208+ }
193209
194210 final DependencyManager _dependencyManager;
195211 final CognitoIdentityProviderClient _base;
Original file line number Diff line number Diff line change @@ -73,6 +73,18 @@ final class ConfigurationStateMachine
7373 }
7474 addInstance (authOutputs);
7575 final waiters = < Future <void >> [];
76+
77+ // Log endpoint configuration
78+ if (authOutputs.userPoolEndpoint != null ) {
79+ safePrint (
80+ '🔧 [Amplify Auth] Configuring Cognito with custom endpoint: ${authOutputs .userPoolEndpoint }' ,
81+ );
82+ } else {
83+ safePrint (
84+ '🔧 [Amplify Auth] Configuring Cognito with default AWS endpoint (no custom endpoint set)' ,
85+ );
86+ }
87+
7688 addInstance <CognitoIdentityProviderClient >(
7789 WrappedCognitoIdentityProviderClient (
7890 region: authOutputs.awsRegion,
You can’t perform that action at this time.
0 commit comments