lib/authenticated_system.rb
# This is ususally what you want; resetting the session willy-nilly wreaks
# havoc with forgery protection, and is only strictly necessary on login.
# However, **all session state variables should be unset here**.
This is ususally what you want; resetting the session willy-nilly wreaks
havoc with forgery protection, and is only strictly necessary on login.
However, **all session state variables should be unset here**.
This is ususally what you want ; resetting the session willy - nilly wreaks havoc with forgery protection and is only strictly necessary on login . However ** all session state variables should be unset here ** .
def logout_keeping_session!
      @current_user.forget_me if @current_user.is_a? User
      @current_user = false 
      kill_remember_cookie! 
      session[:user_id] = nil 
    end
def logout_keeping_session! @current_user . forget_me if @current_user . is_a? User @current_user = false kill_remember_cookie! session [ :user_id ] = nil end
This is ususally what you want; resetting the session willy-nilly wreaks
havoc with forgery protection, and is only strictly necessary on login.
This is ususally what you want ; resetting the session willy - nilly wreaks havoc with forgery protection and is only strictly necessary on login .
# Kill server-side auth cookie # not logged in, and don't do it for me # Kill client-side auth cookie # keeps the session but kill our variable # explicitly kill any other session variables you set