Module: SolidusSocial

Defined in:
lib/solidus_social.rb,
lib/solidus_social/engine.rb,
lib/solidus_social/version.rb,
lib/solidus_social/facebook_omniauth_strategy_ext.rb,
lib/generators/solidus_social/install/install_generator.rb,
app/decorators/models/solidus_social/spree/user_decorator.rb,
app/decorators/controllers/solidus_social/spree/user_registrations_controller_decorator.rb

Defined Under Namespace

Modules: FacebookOmniauthStrategyExt, Generators, Spree Classes: Engine

Constant Summary collapse

VERSION =
'1.6.0'

Class Method Summary collapse

Class Method Details

.configured_providersObject



11
12
13
# File 'lib/solidus_social.rb', line 11

def self.configured_providers
  ::Spree::SocialConfig.providers.keys.map(&:to_s)
end

.init_providersObject



15
16
17
18
19
# File 'lib/solidus_social.rb', line 15

def self.init_providers
  ::Spree::SocialConfig.providers.each do |provider, credentials|
    setup_key_for(provider, credentials[:api_key], credentials[:api_secret])
  end
end

.setup_key_for(provider, key, secret) ⇒ Object



21
22
23
24
25
# File 'lib/solidus_social.rb', line 21

def self.setup_key_for(provider, key, secret)
  Devise.setup do |config|
    config.omniauth provider, key, secret, setup: true
  end
end