Debugging OAuth Redirect Loops Caused by Oversized HTTP Cookies

Last week, we spent almost four hours tracking down a login bug that made zero sense on paper.Our dashboard users signing in with Google or Discord were getting thrown into an infinite redirect loop. They would hit sign in, pick their Google account, authorize it, watch the screen flash for a second, and then land right back on the empty login form.No error message. No red toast. No failed requests in Chrome's network tab. Nothing in the console either.Meanwhile, plain old email-and-password logins worked perfectly. Same database, same API server, same users. If an account logged in with a password, it went straight to the dashboard. If that exact same account clicked "Sign in with Google"
…