Oauth2 redirect_uri usa HTTP cuando mi foro usa HTTPS

Hola,

Acabo de habilitar HTTPS para mi foro de Discourse (Let’s Encrypt + nginx en el sistema anfitrión). No se agregó ninguna redirección, por lo que los visitantes pueden usar HTTP o HTTPS. Todo funcionó como se esperaba.

Luego intenté habilitar la autenticación de Google Oauth2. Sin embargo, noté que Discourse llamó a Google Oauth2 con redirect_uri configurado en la URL HTTP del foro, mientras que el foro se abrió con HTTPS.

¿Cómo puedo solucionarlo? Mi foro es https://discussion.listary.com/. Gracias de antemano por cualquier ayuda.

Do You have force https enabled?

1 me gusta

No. Is there a Discourse setting for that?

Indeed there is!

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

2 Me gusta

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 Me gusta