Giter VIP home page Giter VIP logo

passport-twitch.js's Introduction

Hi there πŸ‘‹

  • πŸ”­ I’m currently working on MMOCreators
  • 🌱 I’m currently learning Terraform Vault
  • πŸ‘― I’m looking to collaborate on MMOCreators
  • πŸ€” I’m looking for help with Streamers Workshop
  • πŸ’¬ Ask me about why I make so many Random Things~
  • πŸ“« How to reach me via Discord: Bioblaze Payne#6459
  • ⚑ Fun fact: I love Candy Corn <3

Bioblaze's github stats

Top Langs

passport-twitch.js's People

Contributors

bioblaze avatar dependabot[bot] avatar holfz avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

holfz ctpax4o

passport-twitch.js's Issues

Error 401 Twitch Api

Describe the bug
My app used to work fine but now i get this error
{
statusCode: 401,
data: '{"error":"Unauthorized","status":401,"message":"Client ID and OAuth token do not match"}'
}

To Reproduce
Steps to reproduce the behavior:

  1. Initialize passport twitch

Expected behavior
To get all information on the callback

Screenshots

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome
  • Version ..

Smartphone (please complete the following information):

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

InternalOAuthError: Failed to obtain access token

The first portion of the oauth strat works fine, user is redirected to twitch, authorizes, etc... When the callback fires though when the user returns I get the 500 error:

InternalOAuthError: Failed to obtain access token
    at Strategy.OAuth2Strategy._createOAuthError (/var/www/html/mc-dev/node-stream/node_modules/passport-oauth2/lib/strategy.js:423:17)
    at /var/www/html/mc-dev/node-stream/node_modules/passport-oauth2/lib/strategy.js:177:45
    at /var/www/html/mc-dev/node-stream/node_modules/oauth/lib/oauth2.js:191:18
    at passBackControl (/var/www/html/mc-dev/node-stream/node_modules/oauth/lib/oauth2.js:132:9)
    at IncomingMessage.<anonymous> (/var/www/html/mc-dev/node-stream/node_modules/oauth/lib/oauth2.js:157:7)
    at IncomingMessage.emit (events.js:387:35)
    at endReadableNT (internal/streams/readable.js:1317:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)

My strategy looks like:

passport.use(
  new twitchStrategy(
    {
      clientID: process.env.TWITCH_CLIENT_ID,
      clientSecret: process.env.TWITCH_CLIENT_SECRET,
      callbackURL: process.env.TWITCH_CALLBACK_URL,
      scope: ["user:read:email", "user:read:broadcast", "user:edit:broadcast"]
    },
    (accessToken, refreshToken, profile, done) => {
      console.log(profile);
      return done(null, profile);

      // console.log(accessToken);
      // console.log(refreshToken);
    }
  )
);

and my routes look like:

router.get('/twitch',
  passport.authenticate('twitch.js', { scope: ["user:read:email", "channel:manage:broadcast"] })
);

router.get('/twitch/callback', 
  passport.authenticate('twitch.js', { failureRedirect: '/login' }),
  function(req, res) {
    // Successful authentication, redirect home.
    res.redirect('/');
});

Any thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.