{
  "id": 21634165,
  "title": "Debugging OAuth Redirect Loops Caused by Oversized HTTP Cookies",
  "url": "https://urgent.news/2026/11/24/debugging-oauth-redirect-loops-caused-by-oversized-http-cookies",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-24T16:01:45.000Z",
  "source": {
    "name": "HackerNoon",
    "slug": "hackernoon",
    "url": "https://hackernoon.com/debugging-oauth-redirect-loops-caused-by-oversized-http-cookies?source=rss"
  },
  "original_language": "en",
  "account": "Over the weekend, a perplexing login bug caused users to be stuck in an infinite redirect loop when signing in with Google or Discord. The issue only affected accounts that had been used extensively across multiple devices. While plain email-and-password logins worked fine, the OAuth flow failed repeatedly, showing no error messages or console output. The problem stemmed from an HTTP cookie size limit of 4KB, as defined by RFC 6265. When users signed in using OAuth, the backend set a large cookie containing the entire user profile data, which grew to over 6,100 bytes due to JSON serialization and percent-encoding. This exceeded the 4KB limit, and Chrome silently discarded the oversized cookie, leaving the frontend with no authentication information. Once the dashboard loaded, the React auth provider couldn't find the user data in localStorage or document.cookie, so it sent the user back to the login screen. The fix involved reducing the cookie size by storing only the session ID instead of the full user object and optimizing the data before encoding.",
  "summary": "A developer traces an infinite OAuth redirect loop to oversized HTTP cookies, uncovering lessons in browser limits, session storage, and authentication.",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}