Possible to reset sessions for all users?

笑着哭i 提交于 2019-12-11 19:57:53

问题


Due to change in authentication procedure I need to reset all sessions for all users, how do I do this in Rails 4?


回答1:


You can change the secret_key your app uses to encrypt cookies in config/initializers/secret_token.rb or you can change the name of the cookie key in config/initializers/session_store.rb either of these changes will invalidate all sessions and require them to be recreated (login again)



来源:https://stackoverflow.com/questions/21467181/possible-to-reset-sessions-for-all-users

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!