I want to cancel a session when a user logs out using Devise, I have a callback to catch when a user logs out, for more protection against session hijacking.
class ApplicationController < ActionController::Base def sign_out(*args) super(*args) reset_session end end
I realized that this would delete the session information stored on the server side, which makes it invalid.
However, I can still log in using the session ID I received before discharge. I donβt understand how it works? I just want to invalidate only this session, not all of them.
I use the default value for session_store.
source share