Cannot log in after log out Discourse (after installing wp-discourse)
The original poster, Arthur_Saint_Martin, is having trouble logging back into their Discourse site after installing the wp-discourse plugin and configuring SSO. They are running both WordPress and Discourse on their local computer using localhost. When trying to reconnect, the login attempt redirects back to WordPress, and they are unable to access their Discourse site.
Stephen points out that running Discourse on a port using localhost is not supported and suggests using a valid DNS address instead. He also mentions that if SSO is enabled, the fallback is yoursite.com/u/admin-login.
Simon suspects a configuration problem with the SSO setup and provides steps to disable SSO on Discourse from the rails console, which should allow for login through the Discourse login form. The SSO settings on both Discourse and WordPress can then be checked and re-enabled.
I installed the plugin “wp-discourse” in my WordPress. I connected WP with the speech successfully, although I didn’t test if it worked, it said it was related to my speech. After that, I tried to log out of the speech to see if the users were synchronized because I installed an SSO and two webhooks (one for users and one for topics).
But when I tried to reconnect, it did not work and also when I press the submit button “connect”, it redirects me directly to the WP. While “wp-discourse” tells me that I am no longer connected to Discourse.
Also, I am always in localhost on both (WP and Discourse).
Is this a development site that you are running on your local computer? That is the only case where you should be using localhost as the site’s domain.
That’s great that you have this setup locally. It sounds like there is a configuration problem with your SSO setup. You can disable SSO on Discourse from the rails console. To get to the console, cd your discourse directory and run:
rails c
When the console prompt appears, run:
SiteSetting.enable_sso = false
Once you have done that, you should be able to login to your Discourse site through its login form. Check your SSO settings on Discourse and WordPress. Then re-enable SSO.