Ruby on rails 为Twitter设计Cookie溢出错误?

Ruby on rails 为Twitter设计Cookie溢出错误?,ruby-on-rails,twitter,devise,Ruby On Rails,Twitter,Devise,我正在尝试使用这个工具将twitter集成到Desive中。我基本上把所有facebook上出现的东西都用twitter取代。但是,当我使用twitter登录时,出现以下错误: ActionDispatch::Cookies::CookieOverflow (ActionDispatch::Cookies::CookieOverflow): 在以下网址: http://localhost:3000/users/auth/twitter/callback?oauth_token=somethin

我正在尝试使用这个工具将twitter集成到Desive中。我基本上把所有facebook上出现的东西都用twitter取代。但是,当我使用twitter登录时,出现以下错误:

ActionDispatch::Cookies::CookieOverflow (ActionDispatch::Cookies::CookieOverflow):
在以下网址:

http://localhost:3000/users/auth/twitter/callback?oauth_token=something&oauth_verifier=blah
有什么好办法可以解决这个问题吗


谢谢

问题在于
会话[“designe.facebook_data”]=env[“omniauth.auth”]
。Twitter的回复包含一个额外的
部分,该部分非常大,不适合会话。一个选项是在会话中存储
env[“omniauth.auth”]。除了(“额外”)

您可以为会话打开ActiveRecord存储。 查看config/initializers/session_store.rb

注释掉关于使用:cookie\u存储的行

取消注释底部关于使用:active\u record\u store的行

# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
# (create the session table with "rails generate session_migration")
MyApp::Application.config.session_store :active_record_store

在rails之前创建迁移
rails g session\u migration
并迁移它。

为了弄清楚我不需要“额外”部分,我使用了
raise request.env[“omniauth.auth”]。\u yaml
是否有任何不利的副作用?我相信只有当会话数据大于4K时才应该使用活动记录存储,它比存储在cookie中要慢一点。一些现成的rails开源cms无法适应这种变化,顺便说一句。。。