This guide explains how to set up LinkedIn OpenID Connect authentication on your Discourse site, allowing users to log in using their LinkedIn accounts.
Required user level: Administrator
Summary
LinkedIn OpenID Connect authentication allows users to sign in to your Discourse site using their LinkedIn accounts. This guide walks you through the process of configuring LinkedIn authentication, from creating a LinkedIn developer application to enabling the feature on your Discourse site.
Creating a LinkedIn application
- Go to LinkedIn Developers
- Click the “Create app” button
- Follow the provided setup process
You’ll need a LinkedIn Page associated with your application. This association cannot be changed later, so ensure you select the correct page during setup.
Enabling OpenID Connect
- Navigate to the “Products” tab in your LinkedIn application
- Request access to “Sign In with LinkedIn using OpenID Connect”
Getting your credentials
Once Sign In with LinkedIn is enabled:
- Click the “View endpoints” button
- Select the “Auth” tab to access your credentials
Configuring Discourse settings
-
In your Discourse admin settings, configure these fields with the credentials from LinkedIn:
linkedin_oidc_client_id
linkedin_oidc_client_secret
-
Return to the LinkedIn developer portal and add an authorized redirect URL under the “Auth” tab:
- Format:
https://discourse.example.com/auth/linkedin_oidc/callback
- Replace
discourse.example.com
with your site’s domain name - Use
https://
for secure sites (recommended) orhttp://
for non-secure sites
- Format:
- Enable LinkedIn authentication on your Discourse site:
- Set
enable_linkedin_oidc_logins
to true in your site settings
- Set
Troubleshooting
If you encounter issues with the client secret validation, ensure you’re running the latest version of Discourse, as recent updates have been made to accommodate LinkedIn’s new secret format.
FAQ
Does LinkedIn sign-in require users to enter their LinkedIn credentials in Discourse?
No, users will be redirected to LinkedIn’s secure login page to authenticate, and then returned to your Discourse site once authorized.
What should I use for the redirect URL protocol (http vs https)?
Always use the same protocol (http or https) that your Discourse site uses. If your site runs on https, use https in the redirect URL.
Additional resources
Last edited by @jessii 2024-11-21T18:43:51Z
Check document
Perform check on document: