Skip to content

Commit

Permalink
[sfdx] Update remote site (#1310)
Browse files Browse the repository at this point in the history
  • Loading branch information
nadaismail-stripe authored Mar 31, 2024
1 parent c61786c commit aa4f636
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,13 @@ def get_all_account_configs
sf_refresh_token = sf_credentials['refresh_token']
sf_instance_url = sf_credentials["instance_url"]
sf_token = sf_credentials["token"]
# puts sf_credentials.to_json

# TODO it seems possible for a user to auth against the wrong account, need to investigate further
if !user.new? && user.salesforce_account_id != sf_account_id
# this likely means a user is trying to auth to Salesforce Org A but most recently logged into Salesforce Org B
raise "User already exists and Salesforce Account ID is not equal. This should never happen."
end

user.salesforce_account_id = sf_account_id
user.salesforce_refresh_token = sf_refresh_token
user.salesforce_instance_url = sf_instance_url
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<RemoteSiteSetting xmlns="http://soap.sforce.com/2006/04/metadata">
<disableProtocolSecurity>false</disableProtocolSecurity>
<isActive>true</isActive>
<isActive>false</isActive>
<url>https://salesforce.suitesync.io</url>
</RemoteSiteSetting>

0 comments on commit aa4f636

Please sign in to comment.