LinkedIn OAuth Setup

Prev Next

You can allow users to sign in to your Rocket.Chat workspace with their LinkedIn accounts. Setup involves alternating between the LinkedIn Developer Portal and your Rocket.Chat admin panel, so keep both open in separate tabs.

Note

LinkedIn deprecated the original "Sign In with LinkedIn" product on August 1, 2023. New apps must use Sign In with LinkedIn using OpenID Connect, which is what this guide covers. Existing integrations created before that date may still work but should be migrated.

Prerequisites

Step 1: Create a LinkedIn app

  1. Go to the LinkedIn Developers Portal and select Create app.

  2. Fill in the required fields and create the app. LinkedIn requires you to associate the app with a LinkedIn Company Page, it cannot be a personal profile. If you do not already administer a Company Page, create one before proceeding.

  3. Open the Products tab and request Sign In with LinkedIn using OpenID Connect. Once added, the openid, profile, and email scopes are provisioned automatically and visible under the Auth tab.

  4. Open the Auth tab. Under Application credentials, note your Client ID and Primary Client Secret. You will paste these into Rocket.Chat in Step 4.

Leave this tab open. You will return to it in Step 3.

Step 2: Get the callback URL from Rocket.Chat

  1. Sign in to your Rocket.Chat workspace as an administrator.

  2. Go to Manage → Workspace → Settings → OAuth.

  3. Expand the LinkedIn section.

  4. Copy the value of LinkedIn Callback URL. It looks like https://your-domain/_oauth/linkedin.

Step 3: Add the callback URL to your LinkedIn app

  1. Return to your LinkedIn app's Auth tab.

  2. Scroll to OAuth 2.0 settings → Authorized redirect URLs for your app and select the edit (pencil) icon.

  3. Add the callback URL you copied from Rocket.Chat.

  4. Save the change.The redirect URL must match exactly, including the scheme and any trailing path. A mismatch causes sign-in to fail with redirect_uri does not match the registered value.

Step 4: Configure LinkedIn OAuth in Rocket.Chat

Back in Rocket.Chat, in the same OAuth > LinkedIn section:

  1. Turn LinkedIn Login on.

  2. Enter the following values:

    • LinkedIn ID: the Client ID from your LinkedIn app

    • LinkedIn Secret: the Primary Client Secret from your LinkedIn app

  3. Select Save changes.

Verify the setup

  1. Sign out of your workspace.

  2. On the sign-in page, confirm that the Sign in with LinkedIn button appears.

  3. Select it and complete the LinkedIn sign-in flow. You should be returned to your workspace and signed in.


Troubleshooting

"redirect_uri does not match" or "No matching login attempt found"

The callback URL in Rocket.Chat and the redirect URL in your LinkedIn app are not identical. Re-copy the value from Rocket.Chat and paste it into LinkedIn exactly as shown, including the scheme.

The Sign in with LinkedIn button does not appear

Confirm that LinkedIn Login is on, that LinkedIn ID and LinkedIn Secret are filled in, and that you saved changes. A hard refresh of the sign-in page may be needed.

"unauthorized_scope_error" or missing email on sign-in

Your LinkedIn app does not have the Sign In with LinkedIn using OpenID Connect product attached. Return to your app's Products tab and request it. The product provides the openid, profile, and email scopes that Rocket.Chat requires.