TheOnlyArtz / Seday

A socket.io / Express / discord.js / RethinkDB app full example of how dashboards should work.
42 stars 12 forks source link

Redirect URL #3

Closed 5h0ne closed 5 years ago

5h0ne commented 5 years ago

I've tried everything I could think of to fix this but I'm having no luck.

{"redirect_uri": ["Not a well formed URL."]}

TheOnlyArtz commented 5 years ago

I've tried everything I could think of to fix this but I'm having no luck.

{"redirect_uri": ["Not a well formed URL."]}

Hey, I'm really sorry for the late reply, but can you please provide more information regarding the issue?

ETLegacyy commented 5 years ago

@TheOnlyArtz when i was playing with it, it done the same thing. It happens when you click Login through Discord. The url has an undefined as well https://discordapp.com/api/oauth2/authorize?client_id=363888422714212352&scope=identify%20guilds&permissions=0&redirect_uri=undefined&response_type=code.

ETLegacyy commented 5 years ago

https://github.com/TheOnlyArtz/Seday/blob/master/src/Website/views/Login.ejs#L22

Bruno-Marley commented 5 years ago

It's because you're missing the redirect_uri in config.json. I'm having the same problem, but I do not know which redirect_uri to put.

https://github.com/TheOnlyArtz/Seday/blob/master/src/Website/config.json.example

TheOnlyArtz commented 5 years ago

The redirect_uri should be: http://localhost:3000/oauth/redirect I think. I will check tomorrow and get back to you with a concrete answer.

TheOnlyArtz commented 5 years ago

@BrunoMarley289 So it's the day after, the redirect_uri is indeed https://localhost:3000/oauth/redirect Note that you need to set it on the bot's OAUTH page in Discord's dashboard too!

TheOnlyArtz commented 5 years ago

So, I've patched many of Sedays issues today! I'm looking forward to keep maintaining it, I've fixed some issues like incorrect sending of payloads and bot's attempts to reconnect to the websocket

Bruno-Marley commented 5 years ago

For me, https://localhost:3000/oauth/redirect was not working, so I put http://localhost:3000/oauth/redirect and it worked.

Bruno-Marley commented 5 years ago

@TheOnlyArtz It is missing to declare the constant "token_type", I declared in line 93 and I think it is working but the file is wrong. https://github.com/TheOnlyArtz/Seday/blob/master/src/Website/routes/get.js

TheOnlyArtz commented 5 years ago

Correct, fixing it right now, what do you mean by the file is wrong ?

Bruno-Marley commented 5 years ago

I fixed it in my code but in the repo file, it was wrong, but now that you've corrected it, it's all right.