That’s great that you found that. If you are finding references to the enable_sso setting in the WP Discourse plugin’s options pages, those references should have been changed to use the new enable_discourse_connect settings name in the most recent release of the plugin (version 2.3.0.)
If there are still references to the old settings name in the plugin’s documentation on Meta, we’ll need to get those updated to use the new settings name. I’ll double check that at the beginning of next week.
Note that while configuring DiscourseConnect, as an admin you can bypass SSO login by going to your Discourse site’s /u/admin-login page. Enter your email address into the form on the page. A one time login link will be emailed to you.
discourse_connect_url (should be set to your WordPress site’s homepage)
discourse_connect_secret (make sure it’s value matches what you have entered in the DiscourseConnect Secret Key setting on your WordPress site)
You should probably also enable the verbose_discourse_connect_logging site setting on Discourse. With that setting enabled you may get some useful details about the cause of the issue in your Discourse error logs.
On WordPress, make sure you’ve filled in the DiscourseConnect Secret Key setting. The only other setting that has to be enabled on WordPress is the Enable DiscourseConnect Provider setting.
@simon thanks a million for the verbose_discourse_connect_logging tip!
Okay, so enable_discourse_connect is false and enable_local_logins is true
Maybe someone knows what is going on here?
Let’s click the admin login email link
Started GET "/session/email-login/5356b2413338852f25d4382e34fb53a6" for {my.ip.address} at 2021-08-07 02:33:43 +0000
Processing by SessionController#email_login_info as HTML
Parameters: {"token"=>"5356b2413338852f25d4382e34fb53a6"}
Rendered default/empty.html.erb within layouts/application (Duration: 0.1ms | Allocations: 11)
Rendered layout layouts/application.html.erb (Duration: 41.1ms | Allocations: 8102)
Completed 200 OK in 66ms (Views: 43.4ms | ActiveRecord: 0.0ms | Allocations: 12210)
Started GET "/session/email-login/5356b2413338852f25d4382e34fb53a6.json" for {my.ip.address} at 2021-08-07 02:33:48 +0000
Processing by SessionController#email_login_info as JSON
Parameters: {"token"=>"5356b2413338852f25d4382e34fb53a6"}
Completed 200 OK in 25ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 4548)
Okay, let’s click the login link on the Discourse Install
Started GET "/session/csrf" for {my.ip.address} at 2021-08-07 02:33:56 +0000
Processing by SessionController#csrf as JSON
Completed 200 OK in 2ms (Views: 0.3ms | Allocations: 308)
Started POST "/session/email-login/5356b2413338852f25d4382e34fb53a6" for {my.ip.address} at 2021-08-07 02:33:57 +0000
Processing by SessionController#email_login as */*
Parameters: {"second_factor_method"=>"1", "timezone"=>"America/Denver", "token"=>"5356b2413338852f25d4382e34fb53a6"}
Completed 200 OK in 231ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 24272)
Something goes sideways here
Started GET "/" for {my.ip.address} at 2021-08-07 02:33:58 +0000
Processing by ListController#latest as HTML
Redirected to http://my.discourse.install/login
Filter chain halted as :redirect_to_login_if_required rendered or redirected
Completed 302 Found in 2ms (ActiveRecord: 0.0ms | Allocations: 613)
Now we just render the login screen which it does just fine
Started GET "/login" for {my.ip.address} at 2021-08-07 02:33:59 +0000
Processing by StaticController#show as HTML
Parameters: {"id"=>"login"}
Rendered static/login.html.erb within layouts/application (Duration: 38.2ms | Allocations: 1520)
Rendered layout layouts/application.html.erb (Duration: 103.4ms | Allocations: 12203)
Completed 200 OK in 130ms (Views: 105.7ms | ActiveRecord: 0.0ms | Allocations: 16261)
Started GET "/login.html" for {my.ip.address} at 2021-08-07 02:34:04 +0000
Processing by StaticController#show as HTML
Parameters: {"id"=>"login"}
Rendered static/login.html.erb (Duration: 22.0ms | Allocations: 1352)
Completed 200 OK in 25ms (Views: 23.0ms | Allocations: 1970)
Also, does anyone know if there is a command I can use in the $rails c cli that will dump all the admin setting / value pairs? I think I could just reset all the DiscourseConnect stuff and start over. Or hell maybe there is a cli command that will just reset all the admin settings to initial state?
—edit to add—
lol, I just found SiteSetting.all , now that is brutal dump of information. Does it have filters?
So I try to add a new account, and I get the following error message:
We cannot detect if your account was created, please ensure you have cookies enabled.
Whaaaat? Maybe I should just re-install???
—edit to add—
I did get the signup verify email, it worked and when I tried to login as a new user I got:
A moderator must manually approve your new account before you can access this forum. You’ll get an email when your account is approved!
lol…
—edit to add—
Just wanted to say I do like the complexity of discourse. It is am amazing piece of software. The only forum that really comes close is XF. Years ago when [unknown] was still the main dev for SimpleMachines, that was a beautiful thing as well, but that era is long over. Thanks to all the devs. This is a great, elegant machine you all have crafted.
I did use Docker, but I reverse proxied it behind apache2 so that I could run it behind Hestia Control Panel as a virtual host. I had set up Hestia with Apache2 instead of Nginx… so that’s why I used Apache2.
If you look at the end of this thread you can see my setup.