Module: Omniauth::Rails::Provider

Defined in:
lib/omniauth/rails/provider.rb,
lib/omniauth/rails/provider/google_oauth2.rb

Defined Under Namespace

Classes: GoogleOauth2

Constant Summary collapse

PROVIDERS =
%w(google_oauth2).freeze

Class Method Summary collapse

Class Method Details

.configure(provider, config) ⇒ Object



13
14
15
16
17
# File 'lib/omniauth/rails/provider.rb', line 13

def configure(provider, config)
  raise "Invalid provider" unless PROVIDERS.include?(provider)
  klass = "Omniauth::Rails::Provider::#{provider.camelize}".constantize
  klass.new(config).configure
end