mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 10:16:22 +00:00
cargar warden automaticamente
This commit is contained in:
parent
cfb1095d59
commit
1ae3754fb5
5 changed files with 12 additions and 3 deletions
6
app/lib/warden/email_and_password.rb
Normal file
6
app/lib/warden/email_and_password.rb
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module Warden
|
||||||
|
module EmailAndPassword
|
||||||
|
end
|
||||||
|
end
|
6
app/lib/warden/imap.rb
Normal file
6
app/lib/warden/imap.rb
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module Warden
|
||||||
|
module IMAP
|
||||||
|
end
|
||||||
|
end
|
|
@ -1,8 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'warden/imap'
|
|
||||||
require 'warden/email_and_password'
|
|
||||||
|
|
||||||
Rails.configuration.middleware.use RailsWarden::Manager do |manager|
|
Rails.configuration.middleware.use RailsWarden::Manager do |manager|
|
||||||
manager.default_strategies :email, :imap
|
manager.default_strategies :email, :imap
|
||||||
manager.failure_app = ->(env) { LoginController.action(:new).call(env) }
|
manager.failure_app = ->(env) { LoginController.action(:new).call(env) }
|
||||||
|
|
Loading…
Reference in a new issue