lynndylanhurley / lynndylanhurley/devise_token_auth

Cookie overflow

Open
#1,673 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
3.6k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Hello,

I fixed an issue on my rails application using google omniauth. Sometimes I got the error :

ActionDispatch::Cookies::CookieOverflow _session_id cookie overflowed with size 4128 bytes

In fact, Google send the avatar image url in callback :

Image

So I think the image should be removed from session storage?

https://github.com/lynndylanhurley/devise_token_auth/blob/02f1117964a751c8c2137c08f3d26987dc6bd42a/app/controllers/devise_token_auth/omniauth_callbacks_controller.rb#L22

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at app/controllers/devise_token_auth/omniauth_callbacks_controller.rb around line 22 and trace how the Google callback data enters the session. Reproduce the CookieOverflow condition described in the issue, then verify that the avatar image URL is no longer stored in the session without breaking the callback flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
api, authentication
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.