5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-14 06:31:41 +00:00

cargar warden automaticamente

This commit is contained in:
f 2019-04-08 15:01:05 -03:00
parent cfb1095d59
commit 1ae3754fb5
No known key found for this signature in database
GPG key ID: 2AE5A13E321F953D
5 changed files with 12 additions and 3 deletions

View file

@ -0,0 +1,6 @@
# frozen_string_literal: true
module Warden
module EmailAndPassword
end
end

6
app/lib/warden/imap.rb Normal file
View file

@ -0,0 +1,6 @@
# frozen_string_literal: true
module Warden
module IMAP
end
end

View file

@ -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) }