Difficulty enabling login plugins


(Ethan) #1

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!


(Neil Lalonde) #2

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.


(Ethan) #3

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!


(Sam Saffron) #4