Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,9 @@ public void onUserSignedOut() {
mUserPoolPoolId = userPoolJSON.getString("PoolId");
final String clientId = userPoolJSON.getString("AppClientId");
final String clientSecret = userPoolJSON.optString("AppClientSecret");
final String pinpointEndpointId = CognitoPinpointSharedContext.getPinpointEndpoint(context, userPoolJSON.optString("PinpointAppId"));
// only attach user pool to Pinpoint if customer specifies an app ID
String pinpointAppId = userPoolJSON.optString("PinpointAppId");
pinpointAppId = pinpointAppId.equals("") ? null : pinpointAppId;
final String cognitoUserPoolCustomEndpoint = userPoolJSON.optString(COGNITO_USERPOOL_CUSTOM_ENDPOINT);

final ClientConfiguration clientConfig = new ClientConfiguration();
Expand All @@ -601,7 +603,7 @@ public void onUserSignedOut() {

userpoolsLoginKey = String.format("cognito-idp.%s.amazonaws.com/%s", userPoolJSON.getString("Region"), userPoolJSON.getString("PoolId"));

userpool = new CognitoUserPool(mContext, mUserPoolPoolId, clientId, clientSecret, userpoolLL, pinpointEndpointId, cognitoUserPoolCustomEndpoint);
userpool = new CognitoUserPool(mContext, mUserPoolPoolId, clientId, clientSecret, userpoolLL, pinpointAppId, cognitoUserPoolCustomEndpoint);
userpool.setPersistenceEnabled(mIsPersistenceEnabled);

mDeviceOperations = new DeviceOperations(AWSMobileClient.this, userpoolLL);
Expand Down