1
0
Fork 0
mirror of https://github.com/requarks/wiki.git synced 2026-03-02 22:06:55 -05:00

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

Open
opened 2026-02-20 17:26:39 -05:00 by deekerman · 10 comments
Owner

Originally created by @b3ck on GitHub (Nov 26, 2019).

Originally assigned to: @NGPixel on GitHub.

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

Originally created by @b3ck on GitHub (Nov 26, 2019). Originally assigned to: @NGPixel on GitHub. ### 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](https://i.imgur.com/Osh4duR.png "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```
Author
Owner

@NGPixel commented on GitHub (Nov 26, 2019):

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 commented on GitHub (Nov 26, 2019): Make sure the redirect URI you entered in Twitch matches the one shown in Wiki.js in Admin > Authentication > Twitch in the reference panel.
Author
Owner

@b3ck commented on GitHub (Nov 26, 2019):

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 commented on GitHub (Nov 26, 2019): 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](https://cdn.discordapp.com/attachments/648402686341021727/648948218968932397/unknown.png "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.
Author
Owner

@b3ck commented on GitHub (Nov 26, 2019):

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 commented on GitHub (Nov 26, 2019): 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](https://i.imgur.com/XBtYeHk.png "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.
Author
Owner

@b3ck commented on GitHub (Nov 26, 2019):

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 commented on GitHub (Nov 26, 2019): 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 😄👍
Author
Owner

@b3ck commented on GitHub (Nov 27, 2019):

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 commented on GitHub (Nov 27, 2019): 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?
Author
Owner

@b3ck commented on GitHub (Nov 27, 2019):

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

@NGPixel would that be useful?

@b3ck commented on GitHub (Nov 27, 2019): I found this, it might help : [passport-twitch-new](https://github.com/Nigh7Sh4de/passport-twitch-new) @NGPixel would that be useful?
Author
Owner

@b3ck commented on GitHub (Dec 10, 2019):

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

@b3ck commented on GitHub (Dec 10, 2019): This shouldn't be marked as help, this is a **bug**. The Twitch Login Strategy is broken and needs to be fixed. Thanks.
Author
Owner

@NGPixel commented on GitHub (Dec 10, 2019):

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

@NGPixel commented on GitHub (Dec 10, 2019): The help label is added automatically based on the issue type.
Author
Owner

@b3ck commented on GitHub (Dec 12, 2019):

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

@b3ck commented on GitHub (Dec 12, 2019): Ahh... Copy that so.. any progress on this issue?
Author
Owner

@b3ck commented on GitHub (Jan 25, 2020):

Hello?

@b3ck commented on GitHub (Jan 25, 2020): Hello?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/wiki-requarks#957
No description provided.