Sha256: 55a6f4ac688368cf3e42f8a089b0ebe50c12188666fbd2325b8f07f44e1f661f
Contents?: true
Size: 680 Bytes
Versions: 60
Compression:
Stored size: 680 Bytes
Contents
# frozen_string_literal: true module Decidim class OmniauthProvider def self.available Rails.application.secrets[:omniauth] || {} end def self.enabled available.select do |_provider, settings| settings[:enabled] == true end end def self.extract_provider_key(enabled_setting_key) enabled_setting_key.gsub("omniauth_settings_", "") .gsub("_enabled", "").to_sym end def self.extract_setting_key(setting_key, provider) setting_key.gsub("omniauth_settings_#{provider}_", "").to_sym end def self.value_defined?(value) value.is_a?(String) && value.present? end end end
Version data entries
60 entries across 60 versions & 1 rubygems