Difficulty enabling login plugins

AI 生成的摘要

In the Support category, user ethangk reported difficulties enabling login plugins, specifically the Slack plugin, without Docker. They noted that the login modal remained unchanged and that site settings did not reflect the plugin’s configuration, suggesting the issue might be related to their non-Docker setup. Additionally, they observed that the login box displayed locale keys instead of actual text.

User neil suggested that since Docker was not being used, the necessary credentials should be added directly to the discourse.conf file rather than via the Admin panel. They provided an example of the required global settings, such as slack_client_id and slack_team_id.

Following this advice, ethangk attempted to add the settings to discourse.conf but ultimately resolved the issue by starting with a fresh, vanilla build, suspecting their previous build was broken. The problem appears to be fixed.

Hey,

I’ve been playing around with login plugins for discourse, and the issue which keeps reappearing is the inability to correctly inject them into the login modal. For example, after installing the slack plugin discussed on this page, the login box in unchanged. If I open up the JS console and look at the Discourse.SiteSettings variables, there’s no mention of slack. If I then reload the page (so that the modal hasn’t been fully generated) and add the Discourse.SiteSettings.enable_slack_login variable, and set it to true, when I open the login modal the button for slack appears. This, of course, isn’t persisted between page loads.

The other strange issue is that the text on the login box is the key for the locale data, and not the text itself.

Something that may be worth mentioning is that I’m doing this without Docker, which may be causing an issue?

Any help would be much appreciated.

Thanks!

Since you’re not using Docker, did you add the settings to your discourse.conf file? Using the Slack plugin as an example, you’ll need to add these:

slack_client_id = 123123123
slack_client_secret = asdfasdasf
slack_team_id = super_friends

Those are “global settings”, not site settings. So you won’t see them in Admin > Settings.

Ok so after playing around a little (including adding these to the discourse.conf file), I realised that the build I had was broken somewhere, and decided to just start from a vanilla build.

I’m still not really sure what was causing the problem, but it appears to be fixed now.

Cheers!