Nabrok / gw2-discord-bot

Discord bot for the Guild Wars 2 API.
GNU General Public License v3.0
33 stars 25 forks source link

Discord OAuth redirect error with web feature #15

Closed gruntzy closed 7 years ago

gruntzy commented 7 years ago

Hi, I am having issues with the "web" feature of the bot.

After accessing the bot's webserver and using the link to authenticate with discord, I get an error page after logging in discord.

The error displayed is the following : Mismatching redirect URI.

I have apache2 as a reverse proxy, the bot is listening on port 4001. I also tried to use the bot with direct ip:port (no proxy), and it resulted in the same error from discord.

Here is my current config :

[web]
domain = "gw2bot.jesuisfan.tk"
protocol = "http"
port = "4001"
public_url = "http://gw2bot.jesuisfan.tk" # Use this for the public url if behind a proxy (such as nginx)

Any idea where the problem may come from ?

Nabrok commented 7 years ago

Make sure that you have http://gw2bot.jesuisfan.tk/auth listed under the redirect URIs for the application on http://discordapp.com/developers/applications/me

gruntzy commented 7 years ago

Thanks a lot, I totally missed that point. Works much better now ! :)