Failed to obtain access token

Hey so I am trying to authenticate with passport, I am using this package: https://www.npmjs.com/package/passport-twitch.js

I have tried other packages as well but I always get the same error message: InternalOAuthError: Failed to obtain access token

What am I doing wrong with my strategy?

passport.use(
    new TwitchStrategy({
        clientID: keys.twitchClientID,
        clientSecrect: keys.twitchClientSecrect,
        // callbackURL:'/auth/twitch/callback',
        callbackURL:'http://127.0.0.1:5000/auth/twitch/callback',
        scope: "user:read:email analytics:read:games",
        proxy: true
    }, (accessToken, refreshToken, profile, done) => {
        console.log(accessToken);
        console.log(profile);
    })

clientSecrect should be clientSecret (and see if you have a typo in the keys.twitchClientSecrect as well)

1 Like

INSANSE!. Thank you omg i feel so stupid I was fighting for hours on this, I was like what the heck why isnt this working?!!! Damn typo lol

Sometimes you just need another pair of eyes.

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