I have found numerous posts that describe how to do this. They all look something like putting this in the appropriate environment config file:
config.action_controller.session[:domain] = '.localhost'
However, if I do this then trying to sign in (I am using devise) fails with:
ActionController::InvalidAuthenticityToken
I see others posting the same problem (to the comments section of the various blogs offering the advice to set session[:domain]) but I haven't found a case where anybody has answered the question about why that is happening and how to fix it.
Any ideas?