Vairav_Lakshmanan is experiencing an issue with Discourse Connect on a local instance. After setting up Discourse Connect for single sign-on (SSO) authentication, clicking the login button results in a NoMethodError. The error occurs due to the FakeDiscourseConnectController not being allowed in a production environment.
hawm suggests that the issue is due to the insecure nature of the authentication plugin, which requires setting the DISCOURSE_DEV_ALLOW_ANON_TO_IMPERSONATE environment variable to 1 for it to work.
david provides a temporary solution by disabling the FakeDiscourseConnectController by creating a dev.yml file in the config directory with the line auth_plugin_enabled: false. This fix allows the redirection to the SSO URL to occur.
Vairav_Lakshmanan confirms that the solution works, and the redirection is now happening successfully.
We are actually trying to test SSO. So our requirement is the discourse which is running locally has to redirect to the SSO URL mentioned in the settings. The above-said redirection is not happening in the local environment.
PS: We already enabled the “enable_discourse_connect” field and provided the “discourse_url” and also the “secret”. When we click on login we are getting the above mentioned error.