Invalid authorization code Electron App

So i’m trying (and learning at the same time to work along with Electron and some of Twitch’s API)

Now I’m using the following module: to help with signing in users but after attempting I keep receiving

error: 'Bad Request',
  status: 400,
  message: 'Invalid authorization code'

Now in the options portion I did remove the accessType since I couldn’t find any reference to it with Twitch API and am presuming it isn’t needed.

Also this module could just not be the right way to do things I’m not really sure at this point. Wondering if anyone else had any insight.


We can’t provide much support for third party libraries. Based on the error, I’m guessing this is doing the authorization code flow instead of implicit grant. It’s likely not submitting a POST to the correct endpoint as described in our docs.

One thing I would caution is that this seems to rely on storing your client secret in plaintext inside of JavaScript. That’s a big security flaw. There is a GitHub issue opened talking about this.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.