Oauth + 2FA with Electron

Myeah, I have searched quite a lot.

Did some more investigation. This is the URL I’m using:
https://api.twitch.tv/kraken/oauth2/authorize?response_type=token&redirect_uri=http%3A%2F%2Flocalhost&scope=channel_editor&client_id=mi6jyhrlwjmi2h8wxk6yyx2urusseu2

After submitting my login details, the following is printed in the Electron console:
Resource interpreted as Document but transferred with MIME type application/json: "https://passport.twitch.tv/authentications/new".
Don’t know if that’s of any significance. I don’t seem to get the same when trying it in Chrome. (where this does work, I forgot to mention) I also noticed the page content mentioned in OP is actually wrapped in HTML tags. Something similar seems to be discussed here:


Again, don’t know if that’s of any significance nor where this needs to be fixed. (if it does)

Also, after trying a dozen times I of course run into the captcha guard, but that also behaves the same way. Returning a page with some JSON error instead of redirecting me back to the login page, or whatever the intended behavior is. Don’t think the console notification was printed for that, though.