LinkedIn OAuth2 Plugin

I’m happy to announce that I’ve updated/upgraded the LinkedIn OAuth plugin created by @Jessp01 to run on the latest version of Discourse and to utilize OAuth2.

You can find the new repo at GitHub - discourse/discourse-plugin-linkedin-auth: LinkedIn OAuth Login support for Discourse

With this release comes a few enhancements.

  • You can update the Client ID and Secret Key via the Admin > Settings area
  • It is now utilizing OAuth2.

Items still to come:

  • I haven’t found a way to let a setting disable the plugin, so although there is such a setting, it doesn’t do anything.

After installing the plugin, you will need to perform the following steps:

  1. Visit https://developer.linkedin.com/docs/oauth2 and follow the directions for creating an application, or look up the details of your existing application.
  2. Update the plugin settings in the Admin > Settings area.
  3. Add the your website as an authorized redirect url using
    https://example.com/auth/linkedin/callback
    (replacing the https with http and example.com with your full qualified domain/subdomain)

Any issues should be reported either here or via a GitHub issue. I also welcome translation file PRs, or general enhancement PRs.

21 Likes

You probably have thought of those updates that they could be useful for this extension but anyway:

  1. Get Linkedin photo
  2. Associate accounts (as other social logins)
  3. Have a Linkedin badge on your public profile that would link to your Linkedin account. (I guess this is more about the general development of Discourse)
1 Like

#2 is already done. So long as you use the same email address (just like with Facebook, Twitter, et al), it will associate it. #3, would require core changes, should that ever come about, that could likely be done (I don’t think that is doable with Twitter or Facebook at this moment either).

Oh so for #2 if you create account with Linkedin (no other account) it shouldn’t show up something on Admin->Users->Login ?? Because for a “Yahoo login” user I see… :confused:

I don’t understand your question. You can use any of the other services to login so long as they all utilize the same email address for your account on a Discourse instance. So if you use myemail@example.com for Facebook, LinkedIn, and Twitter, signing up or logging in with any of those social buttons would result you logged into the same account here on Meta.

I do understand that! :slight_smile: The thing is that when you create a new account with a Yahoo profile, on Admin–>Users–>[the yahoo user]–>Login I can see some info (OpenID https://me.yahoo.com/… (email address) ). But if I create a different user with a Linkedin Account on the same field I see “No account associated”. Is that normal?
I guess I don’t seem to get the purpose of that field, since you already have the email field above, if not to show you the associations (and the links) with the social network profiles.

P.S. I’ve already read https://meta.discourse.org/t/associate-accounts/23179/6 and perhaps this post should have been more appropriate there… :confused:

1 Like

Not sure I see an end point that I can utilize to do this, but maybe there is.

Not sure what the best approach would be to implement it in the same way as Github, Google, Twitter, and Facebook.

3 Likes

Not sure if this is the best approach, but I’ve submitted a PR to core to permit this to work for plugins and existing plugins won’t have to do anything special to implement it, it should work by default.

ping @def, this may interest you.

3 Likes

I think it would be better to edit the first topic!

For a while I’d confused, I thought that I’d installed the outdated plugin. Then when I visited the provided link above it directed me to the link that I’d installed from GitHub - discourse/discourse-plugin-linkedin-auth: LinkedIn OAuth Login support for Discourse