From fb51b7e012177ea90a1aca228171bad563821ed6 Mon Sep 17 00:00:00 2001 From: Anton Ilin Date: Mon, 30 Jan 2023 11:18:55 -0800 Subject: [PATCH] fix: make compatible with omniauth-oauth >= 1.4.0 Version 1.4.0 of omniauth-ouath2 introduced a regression. --- lib/omniauth/strategies/dropbox_oauth2.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/omniauth/strategies/dropbox_oauth2.rb b/lib/omniauth/strategies/dropbox_oauth2.rb index f9d9b2d..73dbfa8 100644 --- a/lib/omniauth/strategies/dropbox_oauth2.rb +++ b/lib/omniauth/strategies/dropbox_oauth2.rb @@ -40,11 +40,12 @@ def raw_info # @raw_info ||= MultiJson.decode(access_token.get('/2/users/get_current_account').body) end + # Fixes regression in omniauth-oauth2 v1.4.0 by https://github.com/omniauth/omniauth-oauth2/commit/85fdbe117c2a4400d001a6368cc359d88f40abc7 def callback_url if @authorization_code_from_signed_request '' else - options[:callback_url] || super + options[:callback_url] || (full_host + script_name + callback_path) end end end