Hi! I’ve been trying to run the PubSub example locally from the repo without success:
I’ve updated the scopes and added the needed client ID and using the redirect URI to my localhost:3030 but after login with Twitch info I’ve got an “redirect mismatch”.
If you’re passing http://localhost:3000/ as a param for the auth URL, is that EXACTLY what you have set in your apps settings in the developer console? It has to be an exact match, including any trailing slashes (or lack thereof).
The current URL in my dev console is http://localhost:8080/, I’ve just changed it in the PubSub example and reload. But still getting the redirect mismatch error
Looking at the example, it’s significantly outdated and uses endpoints and scopes that don’t exist any more.
Try constructing the auth url yourself by following the step by step documentation Getting OAuth Access Tokens | Twitch Developers as that will that’ll help rule out issues of the guide just being out of date.
I’ve checked the auth url against the documentation and also allowed +5min wait time but still getting the “mismatch” error. I’m continue looking into this.
Ok! this solved the issue. I thought I have the same OAuth URL but apparently I forgot to add the port, so used exactly the same one and the redirect works ok launching a different Twitch authorisation page. After clicking ok, the new url appends correctly the #access_token and works as intended!