clarkio / vscode-twitch-highlighter

This is a VS Code extension that will allow your Twitch chat to highlight a line of code via a command message. Example: `!line 8 server.js`. See master branch README.md for more details
https://clarkio.com
203 stars 14 forks source link

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

Closed SableRaf closed 1 year ago

SableRaf commented 3 years ago

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

To Reproduce Steps to reproduce the behavior:

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 commented 3 years ago

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 commented 3 years ago

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

0) restart VSCode 1) register a new application at https://dev.twitch.tv/ (call it whatever) 2) in the "OAuth Redirect URLs" put "http://localhost:5544" 3) in VSCode click the Twitch button and copy the URI (do not reuse an old URI as the state won't match) 4) in the URI replace the client ID with the one from your app 5) in the Twitch OAuth page, authorize the app like normal 6) 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 commented 3 years ago

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 commented 3 years ago

@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 commented 2 years ago

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 commented 1 year ago

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

clarkio commented 1 year ago

@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 commented 1 year ago

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

eyeofthenyte commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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