From 9b0f6c05f7e6e6dfcecf4d4fc385210bb0e6569d Mon Sep 17 00:00:00 2001 From: Masamoto Miyata Date: Thu, 5 Dec 2019 18:27:14 +0900 Subject: [PATCH] Upgrade omniauth-oauth2 version to 1.6 and fix callback_url issue. Fix callback issue. --- lib/omniauth/strategies/line.rb | 4 ++++ omniauth-line.gemspec | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/omniauth/strategies/line.rb b/lib/omniauth/strategies/line.rb index 577f693..a388733 100644 --- a/lib/omniauth/strategies/line.rb +++ b/lib/omniauth/strategies/line.rb @@ -36,6 +36,10 @@ def raw_info raise ::Timeout::Error end + def callback_url + # Fixes regression in omniauth-oauth2 v1.4.0 by https://github.com/intridea/omniauth-oauth2/commit/85fdbe117c2a4400d001a6368cc359d88f40abc7 + options[:callback_url] || (full_host + script_name + callback_path) + end end end end diff --git a/omniauth-line.gemspec b/omniauth-line.gemspec index 2e42e62..92b7a28 100644 --- a/omniauth-line.gemspec +++ b/omniauth-line.gemspec @@ -18,7 +18,7 @@ Gem::Specification.new do |s| s.require_paths = ["lib"] s.add_dependency 'json', '~> 1.3' - s.add_dependency 'omniauth-oauth2', '~>1.3.1' + s.add_dependency 'omniauth-oauth2', '~>1.6.0' s.add_development_dependency 'bundler', '~> 1.0' end