diff --git a/lib/omniauth/strategies/azure_oauth2.rb b/lib/omniauth/strategies/azure_oauth2.rb index 20eee6a..947e486 100644 --- a/lib/omniauth/strategies/azure_oauth2.rb +++ b/lib/omniauth/strategies/azure_oauth2.rb @@ -25,7 +25,7 @@ def client options.client_id = provider.client_id options.client_secret = provider.client_secret - options.tenant_id = + options.tenant_id = provider.respond_to?(:tenant_id) ? provider.tenant_id : 'common' options.authorize_params.domain_hint = provider.domain_hint if provider.respond_to?(:domain_hint) && provider.domain_hint @@ -53,6 +53,9 @@ def client } end + def callback_url + full_host + script_name + callback_path + end def raw_info # it's all here in JWT http://msdn.microsoft.com/en-us/library/azure/dn195587.aspx diff --git a/omniauth-azure-oauth2.gemspec b/omniauth-azure-oauth2.gemspec index 128db48..0b3bdb0 100644 --- a/omniauth-azure-oauth2.gemspec +++ b/omniauth-azure-oauth2.gemspec @@ -19,7 +19,7 @@ Gem::Specification.new do |gem| gem.add_dependency 'omniauth', '~> 1.0' gem.add_dependency 'jwt', '~> 1.0' - gem.add_runtime_dependency 'omniauth-oauth2', '~> 1.1' + gem.add_runtime_dependency 'omniauth-oauth2', '~> 1.4' gem.add_development_dependency 'rspec', '>= 2.14.0' gem.add_development_dependency 'rake'