mirego / accent

The first developer-oriented translation tool. True asynchronous flow between translators and your team.
https://www.accent.reviews
BSD 3-Clause "New" or "Revised" License
1.3k stars 98 forks source link

CANONICAL_URL Ignored #232

Closed lewisakura closed 3 years ago

lewisakura commented 3 years ago

Hi,

I'm following the installation guide and I've hit a roadblock.

I'm trying to set CANONICAL_URL to the domain Accent is running on (https://accent.bots.gg), however it appears to be disregarded completely. In this case, I am using Discord OAuth as the authentication system. When logging in with Discord, the redirect URI is set to https://localhost:4000/auth/discord/callback instead of the expected https://accent.bots.gg/auth/discord/callback. It also uses the same localhost URL as the redirect URI on the callback.

Accent is being reverse proxied via nginx, does the Host header need to be set for this to work?

Cheers.

lewisakura commented 3 years ago

I've tested just forcing the URL in config/runtime.exs to be the correct domain yet it is still using localhost:4000 for external authentication.

lewisakura commented 3 years ago

This seems to be an issue with the Discord integration -- the callback URL needs to be set to CANONICAL_URL/auth/discord/callback in the configuration.