Failed to automatically register with Discourse ID

Howdy,

Fresh like a newborn to the discourse world and trying to give it a whirl. I’ve setup a brand new debian 13 VM and have a custom dns entry setup through cloudflare.
I’ve gone through the setup and first ran into Let’s Encrypt and the whole port 80 callback. I moved the cert process to acme.sh and have that all sorted along with the template entry for cloudflare.

Problem I’m running into now is a failed setup after deploying with the following message:

enable_discourse_id: Failed to automatically register with Discourse ID. This could be due to network connectivity issues, firewall restrictions, or the Discourse ID service being unreachable. Please check server logs for more details or contact support.

You have opted to skip setting up email for now. Unfortunately due to the error message above, the setup cannot continue. Please report this issue on meta.discourse.org.

There is nothing preventing outbound comms on this VM as it was updated and config pulled from the external with no issues.
I’ve checked the container logs and there are no errors of any kind.

Interesting enough, I can add an invalid or valid URI after the base URL and get to the login/signup page or the regular 404 as applicable. Sign up and such would work if I had SMTP configured, but I don’t and don’t really want to mess with that.

Any info or assistance would be appreciated on where to go next to validate/confirm the Discord ID setup to get this functional.

You have been to yoursite.com/logs? That is where the error would be.

I’ve not I’ll check that out.

Looks like a HTTPS redirect error, but I believe I’m forcing https anywhere required:

Discourse ID register failed at step ‘/register’. Error: Request to ‘/register’ failed: 400
Error: {“errors”:[“You supplied invalid parameters to the request: Redirect URI must use HTTPS”],“error_type”:“invalid_parameters”}
Rendered layout layouts/finish_installation.html.erb (Duration: 16.5ms | GC: 0.0ms)
Completed 200 OK in 654ms (Views: 17.9ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.0ms)
Started GET “/” for at 2026-05-27 20:44:09 +0000
Processing by FinishInstallationController#index as HTML
Discourse ID register failed at step ‘/register’. Error: Request to ‘/register’ failed: 400
Error: {“errors”:[“You supplied invalid parameters to the request: Redirect URI must use HTTPS”],“error_type”:“invalid_parameters”}
Rendered layout layouts/finish_installation.html.erb (Duration: 35.0ms | GC: 0.0ms)
Completed 200 OK in 507ms (Views: 36.2ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.0ms)

I did read about a force https setting in the admin panel once you get into the console, but that’s a step past where I can currently get to.

Yes, force_https needs to be enabled. You can enable it from your settings menu, no need for console access:

Nevermind, won’t work if you can’t log into the site. Do you have access to the rails console?

I have root access to the VM and docker container, but don’t know how to access the rails console.

Sorry, correction, no need for the rails console (even though you do have access to it with CLI access). You can make your account like this then:

cd /var/discourse # or wherever you put the `discourse_docker` repo
./launcher enter app
rake admin:create

Wait, I’m confused. You have access to the site as admin? I interpreted

as no admin access, but you said you could read site logs.

I read the site logs from with the app/container, that is how i determined the redirect info above. I was able to create an account via the rake command and then was able to get into the console as an admin and force https. The setup was basically failing and coudln’t continue because of the redirect issue, but I couldn’t make an account to force https because I don’t have an smtp server setup.

Looks to be all good now, although at the login page there isn’t a “login with Discourse ID” as I would expect, but my rake created account logs in fine.

I had to enable it in the admin settings as a login method. All good now.

You can make sure it’s working at yoursite.com/admin/config/login-and-authentication/discourse-id. You can also test by connecting your own account here.

If that solved your problem, make sure to mark as solution so other people know for the future!