Auth plugin interface in 2.1.0


#1

Hello,

I use discourse-mojeid authentication plugin based on OpenIdAuthenticator.

This plugin is not compatible with Discourse 2.1.0 and I want to fix this. I found a commit, which changes the interface (constructor?) of OpenIdAuthenticator, but I cannot find the documentation for this feature.

It seems third string parameter is missing in my discourse-mojeid which should point to some class method. I am not sure what should this parameter do, how should I use it or where to implement this method.

I don’t need any configuration option to enable/disable this plugin. I just want to install it and use it.

Does anyone have an idea?


Cannot upgrade to 2.1.0
#3

Anyone has an idea? I would be satisfied for the point to the documentation or usage example. I cannot find any.


(David Taylor) #4

The plugin needs to be updated for the changes. If the original developer isn’t maintaining the plugin, you could always create your own fork of it.

OpenIDAuthenticator now requires a third parameter, which should be the site setting corresponding to the auth provider. You can see an example in core (the setting is enable_yahoo_logins):

So the plugin needs to:

  1. Add a site setting, some instructions for this can be found here
  2. Add the name of that site setting as the third parameter to OpenIdAuthenticator

#5

Thank you for the reply. I really appreciate the link I haven’t found before.

I have no problem to fork it. Because, I guess, this plugin is probably used only by us, I have become the maintainer anyway.

Is this enable option really a must? It wasn’t required before and the discussion in the pull request reads:

Changes are 100% backwards compatible, but new features will not work for plugins until they are updated.

The plugin is really simple and I don’t want to complicate it unnecessarily.

Thanks


#6

Alright @David, it seems I have handled it.

Would you be so kind and take a look at my “fix”? If the implementation at the moment looks like it should?