Source code of released version
A login service using Discourse SSO as a provider. Based on Meteor oauth modules.
Requires a service to be configured like this:
ServiceConfiguration.configurations.upsert(
{ service: 'discourse' },
{
$set: {
secret: 'secret',
url: 'http://example.discourse.com',
[onlyLoginMods]: true/false,
[onlyLoginAdmins]: true/false,
},
},
);
onlyLoginMods and onlyLoginAdmins are optional, will default to false if not given. Both can be set to only login mods and admins.
I recommend setting secret and url outside of source code in a settings.json file. Read more about it here.
Secret won't be exposed to the client.
To use just call Meteor.loginWithDiscourse();
on the client.