12

So I'm having a problem where I'm not able to log in to Stack Overflow.

As all Stack Overflow (SO) users will know, there are four ways to log in to SO. One is to sign in using Google, the second is from GitHub, the third from Facebook, and finally through the conventional way of email and password.

I hadn't logged in to SO for over five months or so, and when I logged in it just didn't allow me to do so. I first tried the conventional way of email and password. It returned me back straight to the login page.

Then I tried logging in with Google. At first, it did the same as before, i.e. sent me back to the login page, but when I did it a few more times, it showed this message:

Request lacked state, may have been forged

And then it sent this same message every time.

And then, at last, I tried logging in using GitHub. And then, it didn't even direct me to GitHub! It just sent the same message that the "Request lacked state," blah blah blah.

So... I'm stuck here and I cannot login in any way. What can I do?

P.S. - I don't use Facebook and thus can't log in that way.

7
  • 4
    You might be using some plugin and/or security software that blocks cookies. Disable it or whitelist SO, then try again. Nov 17 '20 at 7:18
  • 1
    See comments here. Most likely same issue in your case. Nov 17 '20 at 7:20
  • No, I ain't using any AdBlock or things like that. I freshly built my new PC so it's got no bloatware/unnecessary software in it.
    – LoneWolf
    Nov 17 '20 at 9:44
  • 1
    Well, what browser are you using then? Nov 17 '20 at 9:56
  • Google Chrome and sometimes Firefox. Same results in both browsers.
    – LoneWolf
    Nov 17 '20 at 10:06
  • 1
    Maybe(because the functioning seems sporadic) try under 'edit profile and settings' going to 'My logins' and then click on 'add more logins...' and add a new email address as a login; the new email address login seems to go across different se sites
    – M H
    Dec 2 '20 at 0:04
  • 1
    The new login email may(may because functioning is sporadic) allow a new password setting and then confirmation email sent to it containing the new login confirmation link, which then can be clicked on to confirm the new email & password as a login, which apparently is valid over different se sites; this is in chrome. Thank you :)
    – M H
    Dec 2 '20 at 0:11
13
+150

The solution is to allow cookies for Stack Overflow. Sometimes browsers tend to automatically block cookies but if you allow them you're good to go.

Steps to allow third party cookies in Chrome browser:

  1. Click the More icon (more icon), then click Settings.
  2. Click "Privacy and security" in the left navigation bar.
  3. Click "Site Settings".
  4. Scroll down, and under "Content" click "Cookies and other site data".
  5. Tick the "Allow all cookies" or "Block third-party cookies in Incognito".
  6. Try to log in again to Stack Overflow.

Steps to allow third party cookies in Firefox:

  1. Click the hamburger menu button on the top right corner.
  2. Select "options".
  3. Go to the privacy and security section.
  4. Click "Manage exceptions" option under "Cookies and site data".
  5. Add the URL of Stack Overflow (www.stackoverflow.com) and select "save".
  6. Try to login again to Stack Overflow.

If that doesn't fix your problem, try clearing cookies and device cache, logging in using incognito mode/private mode, logging in from a different device, and then finally contact the Stack Overflow team if your problems are still persistent.

3
  • 1
    Thanks for sharing! This deserved a nice bonus. :) Dec 4 '20 at 10:09
  • 1
    Thanks a lot mate! Wish you a very merry Christmas!
    – LoneWolf
    Dec 13 '20 at 5:14
  • 1
    Very interesting, but does not work. I still see that message, even after allowing 3rd party cookies. What is interesting it is only SO problem, other SE sites login correctly.
    – Gangnus
    Jan 14 at 16:36
7

For me, it was Adblock Plus that was preventing the login. I disabled it temporarily, logged in, and everything works. Chrome Version 87.0.4280.88 (Official Build) (x86_64) macOS 11.0.1

2
  • Yeah, that solution also works sometimes
    – LoneWolf
    Dec 13 '20 at 5:14
  • 1
    I had to do that, also I had to disable BlockSite. Once I had done that and logged into at least one StackAuth-protected site, it looks like I can log in again without disabling those. Weird! Thanks for the help. Mar 19 at 5:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .