OAuth2 redirect_uri verwendet HTTP, während mein Forum HTTPS nutzt

Hallo,

ich habe gerade HTTPS für mein Discourse-Forum aktiviert (Let’s Encrypt + nginx auf dem Host-System). Es wurde keine Umleitung hinzugefügt, sodass Besucher HTTP oder HTTPS nutzen können. Alles funktionierte wie erwartet.

Anschließend habe ich versucht, die Google OAuth2-Authentifizierung zu aktivieren. Dabei fiel mir jedoch auf, dass Discourse Google OAuth2 mit einer redirect_uri aufgerufen hat, die auf die HTTP-Forum-URL zeigte, obwohl das Forum über HTTPS geöffnet war.

Wie kann ich das beheben? Mein Forum ist unter https://discussion.listary.com/ erreichbar. Vielen Dank im Voraus für jede Hilfe.

Do You have force https enabled?

1 „Gefällt mir“

No. Is there a Discourse setting for that?

Indeed there is!

In admin > settings
Search for force https and enable it.

2 „Gefällt mir“

Just tried that setting. And unfortunately, it’s still the same.

I think Discourse should be able to detect the original protocol automatically. I don’t know why it doesn’t work in my case.

I got it working. I used Certbot to manage Let’s Encrypt on my host system. It turned out that some rules Certbot added to the nginx config file is not fully compaitible with Discourse docker. I fixed it according to Running other websites on the same machine as Discourse.

3 „Gefällt mir“