Can't connect GitHub account to GitLab

I’m trying to connect my GitHub account to GitLab, so that my account is used in migrated GitHub repos. However, when I click Connect in my user settings, the authentication fails:

The first few times I tried, I was not prompted with any GitHub dialog. When I tried a few minutes later, I was prompted with a GitHub dialog to authorize, but GitLab still threw that error. I’ve tried:

  • Doing a hard refresh.
  • Removing my cookies for

Solved here.