added developer login strategy for testing

This commit is contained in:
Andreas Stephanides
2018-06-02 12:01:18 +02:00
parent 52fcabf2dc
commit 52ffe0c701
5 changed files with 40 additions and 7 deletions

View File

@@ -225,6 +225,7 @@ Devise.setup do |config|
# up on your models and hooks.
#config.omniauth :facebook, 'appid', 'secret'
secrets = YAML.load_file("#{::Rails.root.to_s}/config/omniauth_secrets.yml")
config.omniauth :developer,:title => "Developer" unless Rails.env.production?
config.omniauth :facebook, secrets["facebook"]["appid"], secrets["facebook"]["secret"]
config.omniauth :ldap, :title => "My LDAP",
:host => secrets["ldap"]["host"],
@@ -236,7 +237,7 @@ Devise.setup do |config|
:bind_dn =>secrets["ldap"]['bind'],
:password => secrets["ldap"]['password']
config.omniauth :developer if Rails.env.development?
# ==> Warden configuration<<
# If you want to use other strategies, that are not supported by Devise, or