Slack: Error: OAuth State mismatch, please try again.

Created on 23 Mar 2020  路  4Comments  路  Source: integrations/slack

When trying to subscribe to a repository, I get the following error:
Error: OAuth State mismatch, please try again.

Steps to reproduce:

  1. Create a Slack workspace
  2. Create a GitHub organization
  3. Create a public repo in the GitHub org
  4. Install the GitHub Slack integration to the Slack workspace
  5. /github subscribe your-organization/your-public-repo
  6. Receive error.

Please have a look and let me know if you can reproduce.

Steps I have tried:

  1. Signing out of the Slack workspace and signing back in.
  2. Removing the GitHub plugin and readding it.
  3. Making sure I am signed into GitHub.

What I haven't tried:

  1. Signing out of GitHub.

Why? Because OAuth should prompt me to authenticate if I need to, and it's not related. There's something wrong with how it's generating the state.

There are no open or closed issues that mention this error.

Most helpful comment

Had the same problem, but found a solution:

  • When you click the "Connect to Github" button in slack, a link is opened in a browser
  • Copy that link into an incognito window
  • Now clicking the button (in the browser) will ask you to auth into github, and the connection is successful.

All 4 comments

Thanks for opening this issue! If you would like to help implement an improvement, read more about contributing and consider submitting a pull request.

I tried signing out of GitHub. Same result.

Had the same problem, but found a solution:

  • When you click the "Connect to Github" button in slack, a link is opened in a browser
  • Copy that link into an incognito window
  • Now clicking the button (in the browser) will ask you to auth into github, and the connection is successful.

Glad you found a workaround, but it's not a solution. Nowhere in the OAuth2 spec does it say "the user must open an incognito window." ;)

Was this page helpful?
0 / 5 - 0 ratings