Discourse Connect on Local instance is not working

When I tried to set up discourse in my local machine following the below article: Beginners Guide to Install Discourse on macOS for Development.

Set up is fine and the discourse is running locally. But when I enable discourse-connect to use discourse connect authentication following the below article: DiscourseConnect - Official Single-Sign-On for Discourse (sso)

After this setup, if I tried to click on login button, am getting the error as follows :slight_smile:

# NoMethodError in DevelopmentAuth::FakeDiscourseConnectController#auth

undefined method `is_allowed?’ for #DevelopmentAuth::FakeDiscourseConnectController:0x00007f9e1e8ec3a8

Please help me to resolve this issue and make discourse connect work in local instance. I have also attached the error screenshot FYR.

TIA

2 Likes

You may take a look:

1 Like

Thanks for the report @Vairav_Lakshmanan, we’ll get this fixed up.

In the meantime, you can disable this FakeDiscourseConnectController by creating a file in the config directory: config/dev.yml

Inside, you need one line:

auth_plugin_enabled: false

Then, when you restart the server, the fake DiscourseConnect provider will be disabled.

2 Likes

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.

1 Like

Thanks for the quick reply. By making the above mentioned change, now the redirection is happening. Thanks a lot

2 Likes