diff --git a/src/AuthProvider/SoapProvider.php b/src/AuthProvider/SoapProvider.php index 7d16f15..c45f32c 100644 --- a/src/AuthProvider/SoapProvider.php +++ b/src/AuthProvider/SoapProvider.php @@ -96,7 +96,8 @@ public function authorize($reauth = false) $soapBody, $matches )) { - $this->instanceUrl = $matches['serverUrl']; + $host = parse_url($matches['serverUrl'], PHP_URL_HOST); + $this->instanceUrl = "https://$host/"; $this->token = $matches['sessionId']; } else { throw new SessionExpiredOrInvalidException("Failed to login to Salesforce.", "INVALID_CREDENTIALS");