为 Twitter 设计,Cookie 溢出错误? [英] Devise for Twitter, Cookie Overflow error?
问题描述
我正在尝试使用此指南将 twitter 集成到设计中.我基本上把所有出现的 facebook 都用 twitter 代替.但是,当我使用 Twitter 登录时,出现以下错误:
I am trying to integrate twitter into devise using this guide. I basically take all occurence of facebook and substitue it with twitter. However, when I sign in with twitter, I am getting the following error:
ActionDispatch::Cookies::CookieOverflow (ActionDispatch::Cookies::CookieOverflow):
在以下网址:
http://localhost:3000/users/auth/twitter/callback?oauth_token=something&oauth_verifier=blah
有什么好的方法可以解决这个问题吗?
Is there any nice way to get around fixing this problem?
谢谢!
推荐答案
问题在于 session["devise.facebook_data"] = env["omniauth.auth"]
.Twitter 的响应包含一个非常大且不适合会话的 extra
部分.一种选择是将 env["omniauth.auth"].except("extra")
存储在会话中.
The problem is with session["devise.facebook_data"] = env["omniauth.auth"]
. Twitter's response contains an extra
section that is very large and does not fit in the session. One option is to store env["omniauth.auth"].except("extra")
in the session instead.
这篇关于为 Twitter 设计,Cookie 溢出错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!