为Twitter设计,Cookie溢出错误? [英] Devise for Twitter, Cookie Overflow error?

查看:102
本文介绍了为Twitter设计,Cookie溢出错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用这个指南将twitter集成到设计中。我基本上都是采用Facebook的所有事情,并用twitter取代它。但是,当我使用twitter登录时,我收到以下错误:

  ActionDispatch :: Cookies :: CookieOverflow(ActionDispatch: :Cookie :: CookieOverflow):

在以下网址:

  http:// localhost:3000 / users / auth / twitter / callback?oauth_token = something& oauth_verifier = blah 
/ pre>

有没有什么好办法解决这个问题?



谢谢!

解决方案

问题在于 session [devise.facebook_data] = env [omniauth.auth] 。 Twitter的响应包含非常大的额外部分,不适合会话。一个选项是在会话中存储 env [omniauth.auth]。except(extra)


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):

at the following url:

http://localhost:3000/users/auth/twitter/callback?oauth_token=something&oauth_verifier=blah

Is there any nice way to get around fixing this problem?

Thanks!

解决方案

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆