lib/devise/controllers/sign_in_out.rb in devise-4.7.3 vs lib/devise/controllers/sign_in_out.rb in devise-4.8.0
- old
+ new
@@ -104,13 +104,15 @@
end
private
def expire_data_after_sign_in!
+ # TODO: remove once Rails 5.2+ and forward are only supported.
# session.keys will return an empty array if the session is not yet loaded.
# This is a bug in both Rack and Rails.
# A call to #empty? forces the session to be loaded.
session.empty?
+
session.keys.grep(/^devise\./).each { |k| session.delete(k) }
end
alias :expire_data_after_sign_out! :expire_data_after_sign_in!
end