Reputation: 906
Just want to know is there a way to destroy all sessions for a rails application from the server side. At the moment we have a auto redirect if someone is logged in. I want to stop that for users that are logged in. I was thinking of resetting the security token (in application_controller) then deploy. However I see that from the documentation it raises a exception. Is there a cleaner was to do this in Rails 3.2.0?
Thanks
Upvotes: 1
Views: 441
Reputation: 5973
I will just change the session token, in config/initializers/secret_token.rb
:
# Your secret key for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
MyAPP::Application.config.secret_token = 'ABC123'
Upvotes: 1