mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-27 15:48:08 -05:00
Don't pass options forward, this fixes uncaught warden error. Unfortunately could not write a test for it, although easily reproducible in Rails applications. Closes #754
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
# in each request and in case the user is using other strategies beside Devise ones.
|
||||
Warden::Manager.after_set_user do |record, warden, options|
|
||||
if record && record.respond_to?(:active?) && !record.active?
|
||||
warden.logout(options[:scope])
|
||||
throw :warden, options.merge(:message => record.inactive_message)
|
||||
scope = options[:scope]
|
||||
warden.logout(scope)
|
||||
throw :warden, :scope => scope, :message => record.inactive_message
|
||||
end
|
||||
end
|
||||
@@ -13,7 +13,7 @@ Warden::Manager.after_set_user do |record, warden, options|
|
||||
path_checker = Devise::PathChecker.new(warden.env, scope)
|
||||
unless path_checker.signing_out?
|
||||
warden.logout(scope)
|
||||
throw :warden, options.merge(:message => :timeout)
|
||||
throw :warden, :scope => scope, :message => :timeout
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user