swiftyspiffy / twitch-token-generator

Repository for the source that sits on https://twitchtokengenerator.com
85 stars 11 forks source link

Request token always throws "invalid scopes" #1

Closed vaindil closed 6 years ago

vaindil commented 6 years ago

I'm trying to use the request token feature, but no matter what I do I always get "invalid scopes" thrown when I click "Generate Link" in the modal. This happens regardless of which scopes I choose, I couldn't find any combination that actually worked. No console errors are thrown when the alert is thrown, but my console is full of errors like this, pointing to TwitchController.js:12:

Uncaught TypeError: Cannot read property 'getAttribute' of null
    at BasicController.isPlaying (TwitchController.js:12)
    at BasicController.getState (BasicController.js:226)
    at window.sendState (content.js:98)
    at MutationObserver.BasicController.stateChangeObserver.WebKitMutationObserver (BasicController.js:74)
swiftyspiffy commented 6 years ago

I’ll look into the issue here in a few hours.

vaindil commented 6 years ago

Reinstalled Windows recently and Fiddler was being stupid, finally got it working. -_- The request being sent is:

POST /request/create.php
scopes=clips%3Aedit%2Bchat_login&my_name=vaindil&my_email=me%40example.com
vaindil commented 6 years ago

Ah, looks like the Helix scopes aren't accepted in create.php, is that intended?

swiftyspiffy commented 6 years ago

Alright, pushed some code to the server. Try again.

vaindil commented 6 years ago

Perfect, it works now. Thank you!

swiftyspiffy commented 6 years ago

Awesome!