Skip to content

Commit

Permalink
Merge pull request #222 from ShopFelixGray/remove-scope
Browse files Browse the repository at this point in the history
Remove scope
  • Loading branch information
damianlegawiec authored Sep 13, 2018
2 parents 6f7401d + 5f1a8ab commit 7963d42
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/spree_social/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def self.activate
end

# Setup all OAuth providers
def self.init_provider(provider, scope='email')
def self.init_provider(provider)
begin
ActiveRecord::Base.connection_pool.with_connection(&:active?)
rescue
Expand All @@ -51,12 +51,12 @@ def self.init_provider(provider, scope='email')
secret = auth_method.api_secret
Rails.logger.info("[Spree Social] Loading #{auth_method.provider.capitalize} as authentication source")
end
setup_key_for(provider.to_sym, key, secret, scope)
setup_key_for(provider.to_sym, key, secret)
end

def self.setup_key_for(provider, key, secret, scope)
def self.setup_key_for(provider, key, secret)
Devise.setup do |config|
config.omniauth provider, key, secret, setup: true, scope: scope, info_fields: 'email, name'
config.omniauth provider, key, secret, setup: true, info_fields: 'email, name'
end
end
end
Expand Down

0 comments on commit 7963d42

Please sign in to comment.