I am trying to work with Passport JS, and on their site under Strategies I see 2 different Twitch ones, but they use the same example code; and then when I go to the github I see a third auth example using Passport and I am unsure which one to follow.
Also, when I am testing my code I am getting Error 400 Invalid Client ID but I have it set correctly. And I am sure this also plays in, but under my developer console I am seeing:
reload.js:22 WebSocket connection to 'ws://localhost:3000/auth/login/ws' failed: Error during WebSocket handshake: Unexpected response code: 404 I didn’t see any reference to a WebSocket establishment in the example code.
Example 1: Looks very old, abandoned, and probably doesn’t work with the latest Helix changes.
Example 2: Confirmed to not work with the latest changes.
Example 3: Generally looks good, but seeing that it’s not an npm package, it would involve copy-pasting code, which is never a good idea in case it needs updates.
I just published a fork of passport-twitch-new which works with the new Helix changes: