0

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.

New contributor
Tejas Joshi is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • 3
    You might be using some plugin and/or security software that blocks cookies. Disable it or whitelist SO, then try again. – Shadow 10 Years Wizard Nov 17 at 7:18
  • 1
    See comments here. Most likely same issue in your case. – Shadow 10 Years Wizard Nov 17 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. – Tejas Joshi Nov 17 at 9:44
  • 1
    Well, what browser are you using then? – Shadow 10 Years Wizard Nov 17 at 9:56
  • Google Chrome and sometimes Firefox. Same results in both browsers. – Tejas Joshi Nov 17 at 10:06
  • 1
    Clear cache of the browsers, also do you have any security software of your PC? Anti Virus? Some come with default software so you have to check, even if you didn't install one yourself. So check what you got, and disable it. If you then can login, you found the problem. If not, well, it is still something on your side that blocks something required to SO in order to login. – Shadow 10 Years Wizard Nov 17 at 10:08
  • I've not got any antivirus except the windows defender. And I clear my cache regularly but it doesn't help. – Tejas Joshi Nov 17 at 10:19
  • 1
    Try logging in using Incognito mode or Guest mode of the browser. – Shadow 10 Years Wizard Nov 17 at 10:41
  • It still didn't work! It redirects me back to the Home page! – Tejas Joshi Nov 17 at 13:32
  • 1
    Next idea: try creating new account. Can you login? If so, ask for a merge. – Shadow 10 Years Wizard Nov 17 at 18:28
  • Still cannot log in. I'm now beginning to think that Stack Overflow hates me lmao. – Tejas Joshi Nov 20 at 13:32
  • Hey and should I start a bounty for it because I really don't want my account to be lost? – Tejas Joshi Nov 20 at 13:33
  • 1
    Sorry out of ideas. Bounty won't hurt, but also contact the team by clicking "contact" in the footer, and submit a support form. – Shadow 10 Years Wizard 2 days ago
  • Hey, wait! I found a solution! I dived deep into the chrome settings and messed around with them. I found that one option was auto-blocking cookies and deleting cache. I fixed it. Should I post a self answer to help other people with the same people? – Tejas Joshi 2 days ago
  • 1
    Sure, please post it as a self answer. – Shadow 10 Years Wizard yesterday
3

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.

If that doesn't fix your problem, try clearing cookies, 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.

| improve this answer | |
New contributor
Tejas Joshi is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • 1
    This answers value would increase if it contained steps on how to whitelist / stop blocking cookies. – Luuklag 8 hours ago
  • 2
    @Luuklag I've added steps for Chrome, hopefully others can add for other browsers. – Shadow 10 Years Wizard 6 hours ago
  • I didn't look into that, but I'll add steps for firefox now. – Tejas Joshi 14 mins ago

You must log in to answer this question.

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