From 2a4385bbe92541def9b11ed7585f26aa0b494fde Mon Sep 17 00:00:00 2001 From: David Gautier Date: Wed, 7 Nov 2018 11:15:55 +0100 Subject: [PATCH] Allow to dynamically change the site The site updated for the `request_phase` using request params is also updated for the `callback_phase` --- lib/omniauth/strategies/salesforce.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/omniauth/strategies/salesforce.rb b/lib/omniauth/strategies/salesforce.rb index a7b21d7..a7a2d27 100755 --- a/lib/omniauth/strategies/salesforce.rb +++ b/lib/omniauth/strategies/salesforce.rb @@ -34,6 +34,11 @@ def request_phase super end + def callback_phase + options.update(@env["omniauth.params"]) + super + end + def auth_hash signed_value = access_token.params['id'] + access_token.params['issued_at'] raw_expected_signature = OpenSSL::HMAC.digest('sha256', options.client_secret.to_s, signed_value)