diff --git a/app/lib/warden/email_and_password.rb b/app/lib/warden/email_and_password.rb new file mode 100644 index 0000000..957770d --- /dev/null +++ b/app/lib/warden/email_and_password.rb @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +module Warden + module EmailAndPassword + end +end diff --git a/lib/warden/email_and_password.rb b/app/lib/warden/email_and_password/strategy.rb similarity index 100% rename from lib/warden/email_and_password.rb rename to app/lib/warden/email_and_password/strategy.rb diff --git a/app/lib/warden/imap.rb b/app/lib/warden/imap.rb new file mode 100644 index 0000000..fe435be --- /dev/null +++ b/app/lib/warden/imap.rb @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +module Warden + module IMAP + end +end diff --git a/lib/warden/imap.rb b/app/lib/warden/imap/strategy.rb similarity index 100% rename from lib/warden/imap.rb rename to app/lib/warden/imap/strategy.rb diff --git a/config/initializers/warden.rb b/config/initializers/warden.rb index b527966..9af19d0 100644 --- a/config/initializers/warden.rb +++ b/config/initializers/warden.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'warden/imap' -require 'warden/email_and_password' - Rails.configuration.middleware.use RailsWarden::Manager do |manager| manager.default_strategies :email, :imap manager.failure_app = ->(env) { LoginController.action(:new).call(env) }