Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to authorize Twitch account (error=redirect_mismatch&error_description=Parameter+redirect_uri+does+not+match+registered+URI) #137

Closed
SableRaf opened this issue May 12, 2021 · 12 comments

Comments

@SableRaf
Copy link

Describe the bug
Cannot connect extension to Twitch. Getting a redirect error.

To Reproduce
Steps to reproduce the behavior:

  • Follow the Getting started steps until step 9 "Choose the "Open" option which should open a new tab of your default browser."
  • A page opens that reads "You are about to leave Twitch. Twitch has no control over the content or security of https://localhost:5001."
  • Click on "continue"
  • Get error (see screenshot below)

Expected behavior
Move on to step 10 "Read through the permissions that are being requested for use of this bot/extension and choose "Authorize""

Screenshots
image

VSCode Version
Version: 1.56.1 (user setup)
Commit: e713fe9b05fc24facbec8f34fb1017133858842b
Date: 2021-05-06T10:08:05.141Z
Electron: 12.0.4
Chrome: 89.0.4389.114
Node.js: 14.16.0
V8: 8.9.255.24-electron.0
OS: Windows_NT x64 10.0.19042

Additional context
Using Chrome Version 90.0.4430.93 (Official Build) (64-bit)

@SableRaf
Copy link
Author

I noticed that the link I got out of VSCode had the wrong URL
image

I managed to get the authorization page to appear by replacing http://localhost:5544 with https://localhost:5001 in the URI

Unfortunately, clicking "Authorize" brings "ERR_CONNECTION_REFUSED" once again.

If in that page I do the opposite substitution, I do get the "You can close this window" message to briefly show, but it's quickly replaced by a 500 error.

In VSCode, this error appears: "Error while logging in. State mismatch error."

image

@SableRaf
Copy link
Author

SableRaf commented May 14, 2021

Here's a temporary solution (thanks to @Stefterv for the help)

  1. restart VSCode
  2. register a new application at https://dev.twitch.tv/ (call it whatever)
  3. in the "OAuth Redirect URLs" put "http://localhost:5544"
  4. in VSCode click the Twitch button and copy the URI (do not reuse an old URI as the state won't match)
  5. in the URI replace the client ID with the one from your app
  6. in the Twitch OAuth page, authorize the app like normal
  7. as soon as the "close window" message appear, close the window (otherwise the state mismatch will log you out again)

@clarkio: replacing the redirect URL with http://localhost:5544 in your own Twitch app should fix it

Screenshot

image

@clarkio
Copy link
Owner

clarkio commented May 16, 2021

Hey thanks for raising this to my attention. I'm not sure yet when I'll have time to address it but hope to do so soon. Thanks for your patience

@clarkio
Copy link
Owner

clarkio commented Sep 6, 2021

@SableRaf This should be resolved now in version 1.0.3. Could you double check and if so we can close this issue. Thanks again for bringing this to my attention 🙂👍

@eyeofthenyte
Copy link

eyeofthenyte commented Sep 27, 2022

Hey so there was some shenanigans that happened with my computer, email, & twitch account that I've since taken care of. I tried to do a test stream and verify that everything works but when I go to connect this extension I get login authentication failed. Is there a way to reset everything? I tried to uninstall and reinstall the extension in VS code, VScode itself, as well as remove the connection in Twitch.

@JavatechWorld
Copy link

This is not resolved yet .I am trying the same using Springboot java code , causing same issue .Has the author Identified any solution ?

@clarkio
Copy link
Owner

clarkio commented Apr 21, 2023

@JavatechWorld @eyeofthenyte and anyone else that was still experiencing an issue while signing in to your Twitch account with this extension. We just released a new version (1.0.5) that should help with this further. Could you give it a try and let me know if things are working better for you.

Please note it is probably best to first sign out of the extension by opening the command palette, searching for "Twitch Highlighter: Sign-out of Twitch" (see image below for reference) and selecting to sign out by pressing your Enter key.

image

@clarkio
Copy link
Owner

clarkio commented Apr 21, 2023

For reference this is the most recent set of changes that have been deployed to help with all this: #165

@eyeofthenyte
Copy link

@JavatechWorld @eyeofthenyte and anyone else that was still experiencing an issue while signing in to your Twitch account with this extension. We just released a new version (1.0.5) that should help with this further. Could you give it a try and let me know if things are working better for you.

Please note it is probably best to first sign out of the extension by opening the command palette, searching for "Twitch Highlighter: Sign-out of Twitch" (see image below for reference) and selecting to sign out by pressing your Enter key.

image

I have been able to update and confirm that this fix works. Signing out and signing back in allowed me to reconfirm the linking of the account.

Thanks for your hard work!

@clarkio
Copy link
Owner

clarkio commented Apr 25, 2023

That's great to hear @eyeofthenyte. Hope others experience the same now as well. Will give this a bit more time before closing the issue.

@clarkio
Copy link
Owner

clarkio commented May 2, 2023

I'm going to leave this issue open for about one more week to see if we can confirm other folks who experienced this can validate it works for them as well. If nothing new is reported I'll close this one. If something comes up folks can open a new issue.

@clarkio
Copy link
Owner

clarkio commented Jun 14, 2023

Nothing new has been reported so closing this one out. If something comes up please feel free to open a new issue. Thanks!

@clarkio clarkio closed this as completed Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants