python-salesforce-api icon indicating copy to clipboard operation
python-salesforce-api copied to clipboard

Use the original instance_url for soap auth

Open 54sledgehammer45 opened this issue 3 years ago • 2 comments

The explicitly set server/instance URL was being overriden by what the server returned. There are however probably good reasons for the original URL to be set by the developer. Ignoring the developer's decision without giving an option to override, forces the developer to copy-paste and rewrite code that uses the method.

This commit makes that unnecessary.

Fixes #21 : SOAP auth overwrites instance URL

54sledgehammer45 avatar Jul 05 '21 12:07 54sledgehammer45

Hello @54sledgehammer45! Thank you for the PR!

This is a very valid point! I would like to test this before merging though.

As I remember, the reason I went with this solution is that you might use test.salesforce.com as your initial instance-url, but then once logged in, you're provided with your personal instance url.

I will confirm this :)

felixlindstrom avatar Jul 07 '21 08:07 felixlindstrom

Hey @felixlindstrom,

My tests weren't extensive enough and I just tested that it could login. Other calls to the endpoints were failing. That's fixed in the last force-push.

I wasn't aware of test.salesforce.com. We use the personal test instance URL directly which is probably why we don't see the error.

Cheers

54sledgehammer45 avatar Jul 07 '21 08:07 54sledgehammer45