Skip to content

Commit

Permalink
Make the strategy work with new omniauth
Browse files Browse the repository at this point in the history
icoretech/omniauth-spotify#8 (comment)
zquestz/omniauth-google-oauth2#205

Google OAuth 2 talks about the problem with new Omniauth version's callback_url. Manually specific
the callback url to remove the query string
  • Loading branch information
sb8244 committed Feb 15, 2017
1 parent bf61cd7 commit b10a577
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions lib/omniauth/strategies/salesloft.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ class SalesLoft < OmniAuth::Strategies::OAuth2
def raw_info
@raw_info ||= access_token.get("/public_api/v1/me.json").parsed
end

private

def callback_url
options[:redirect_uri] || (full_host + script_name + callback_path)
end
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions omniauth-salesloft.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]

spec.add_dependency "omniauth", "~>1.0"
spec.add_dependency "omniauth-oauth2", "~>1.0"
spec.add_runtime_dependency 'omniauth', '>= 1.1.1'
spec.add_runtime_dependency 'omniauth-oauth2', '>= 1.3.1'

spec.add_development_dependency "bundler", "~> 1.5"
spec.add_development_dependency 'rspec', '~> 3.2', '>= 3.2.0'
Expand Down

0 comments on commit b10a577

Please sign in to comment.