Implementing SSO for dev environment and troubleshoot

AI-generated summary

James_Park is tasked with implementing Single Sign-On (SSO) for his company’s dev environment before integrating it with Discourse. He set up a Node backend server and a test route, but encountered issues while following the official guide. After enabling enable_sso to true, he was unable to access the admin panel and reset it. simon provided a solution by entering the rails console and setting SiteSetting.enable_sso to false. James_Park successfully reset the setting and is now looking for documentation on setting up SSO in a dev environment. sam recommended reading the official SSO guide, but noted that there is no specific documentation for dev environments.

Hey all,

So I am currently tasked with figuring out how to implement SSO for my company and they wanted me to learn how to set it up in the dev environment before we go forward with integrating Discourse.

I am using a Node back end server running in my localhost port and set up a test route. Discourse is running on my WSL environment on a different localhost port.

Couple of questions since my google-fu doesn’t seem to be getting any results.

  1. How should I go about setting it up while following the official guide
  2. I set enable_sso to true but my initial route failed and now I cannot access my admin panel to change it. Obviously sending an email doesn’t work for me so I attempted to reset it in my WSL environment but can’t seem to find a launcher file. How can I fix this?

Thanks!

If you have access to the rails console, enter it and then run:

SiteSetting.enable_sso = false

Which file do I access to run that command?

Is your dev enviroment running on your local computer? If so, how did you set it up? If you are using a non-docker install, all you need to do is go to the /discourse directory in your terminal and enter
rails c
to access the console prompt.

Thank you! When I was trying the rails command I thought it was returning an error. Was able to set it off.

Is there any documentation of setting up SSO in a dev environment?

Nothing specific for dev, just be sure to read through