diff --git a/src/main/java/com/salesforce/dataloader/config/Config.java b/src/main/java/com/salesforce/dataloader/config/Config.java index 86024a0d..afda4190 100644 --- a/src/main/java/com/salesforce/dataloader/config/Config.java +++ b/src/main/java/com/salesforce/dataloader/config/Config.java @@ -1635,6 +1635,7 @@ public void setOAuthEnvironment(String environment) { String envSpecificOAuthRedirectURI = getOAuthEnvironmentString(environment, OAUTH_PARTIAL_REDIRECTURI); String redirectURI = ""; if (envSpecificOAuthRedirectURI != null + && !envSpecificOAuthRedirectURI.isBlank() && !envSpecificOAuthServerURL.contains(Config.DEFAULT_ENDPOINT_URL_SANDBOX) && !envSpecificOAuthServerURL.contains(Config.DEFAULT_ENDPOINT_URL_PROD)) { redirectURI = envSpecificOAuthRedirectURI;