wiki icon indicating copy to clipboard operation
wiki copied to clipboard

Twitch Login Strategy Error :: Parameter redirect_uri does not match registered URI

Open b3ck opened this issue 6 years ago • 10 comments

Actual behavior

After adding in all of the correct information (from Twitch Dev Console) in the Twitch Strategy Module I tried to login and get the following error: Parameter redirect_uri does not match registered URI

Wiki.js Twitch Strategy Error


Expected behavior

Log into Wiki.js with Twitch Username.


Steps to reproduce the behavior

Try to log in?


System Information:

Wiki.js: Stable 2.0.12 OS: Ubuntu 16.04 x86_64 DB: PostgreSQL 9.5 SSL Enabled: Let's Encrypt

b3ck avatar Nov 26 '19 17:11 b3ck

Make sure the redirect URI you entered in Twitch matches the one shown in Wiki.js in Admin > Authentication > Twitch in the reference panel.

NGPixel avatar Nov 26 '19 18:11 NGPixel

It does match, I was looking at the code, for the Twitch strategy and it doesn't seem it's using the authorization URL or the scope like in the Discord strategy.. but then again.. I'm not a coder =/

Twitch Discord Strategies

Edit: I was able to get the Discord login to work, Twitch did update their API, so I don't know how recently you've made sure it works or not.

b3ck avatar Nov 26 '19 20:11 b3ck

So I went into the passport-twitch strategy, and replaced the old authorization URLs with the new twitch api, now I need to figure out a way to fetch the user profile as that is my current error:

Twitch Fetch Error

Obviously this is going to happen since I totally switched to a different API, so more investigating is in order, I'll update you when I can.

b3ck avatar Nov 26 '19 21:11 b3ck

Yeah.. I don't know what Twitch API you guys have this based on, there is v3, v5 and now the "New Twitch API" so.. I don't know.. getting kinda lost in all of these APIs so I'm going to stop for now, let me know if you come up with anything, thanks 😄👍

b3ck avatar Nov 26 '19 21:11 b3ck

So I changed everything back to default and replaced line 16 in the /server/modules/authentication/twitch/authentication.js file;

from: callbackURL: conf.callbackURL to: callbackURL: "https://wiki.b3ck.com/login/twitch/callback"

And I am no longer getting the: Parameter redirect_uri does not match registered URI error.

But now I am getting the: failed to fetch user profile error.

Thoughts?

b3ck avatar Nov 27 '19 15:11 b3ck

I found this, it might help : passport-twitch-new

@NGPixel would that be useful?

b3ck avatar Nov 27 '19 18:11 b3ck

This shouldn't be marked as help, this is a bug. The Twitch Login Strategy is broken and needs to be fixed. Thanks.

b3ck avatar Dec 10 '19 22:12 b3ck

The help label is added automatically based on the issue type.

NGPixel avatar Dec 10 '19 23:12 NGPixel

Ahh... Copy that so.. any progress on this issue?

b3ck avatar Dec 12 '19 20:12 b3ck

Hello?

b3ck avatar Jan 26 '20 04:01 b3ck