Skip to main content

Introduction

Adding Sign in with LinkedIn lets your users register and log in with their LinkedIn account. You’ll create an app in the LinkedIn Developer portal, add the Sign In with LinkedIn using OpenID Connect product, then paste its credentials into your admin Auth Settings page. Credentials are stored securely in the database and applied automatically — there are no .env edits or code changes.
LinkedIn must return an email address. This is provided by the OpenID Connect email scope, which the product in Step 2 adds for you.

Before you start

  • Admin access to your MagicAds platform.
  • A LinkedIn account with access to the LinkedIn Developer portal.
  • A LinkedIn Company Page — LinkedIn requires associating an app with a Page.
  • Your site’s public URL (HTTPS strongly recommended).

Step 1 — Note your Callback URL

The callback URL is where LinkedIn sends users back after they approve sign-in:
https://YOUR_DOMAIN/auth/linkedin/callback
For example: https://app.example.com/auth/linkedin/callback
If your site uses a language prefix in its URLs (localization), the callback may include a locale segment such as /en/auth/linkedin/callback. Whatever you enter in the Callback URL field in Auth Settings must match the value registered in your LinkedIn app exactly.

Step 2 — Create a LinkedIn app

1

Open the LinkedIn Developer portal

Go to linkedin.com/developers/apps and click Create app.
2

Fill in app details

Provide the App name, associate it with your LinkedIn Company Page, upload a logo, and accept the legal terms. Create the app.
3

Add the OpenID Connect product

Open the Products tab and request Sign In with LinkedIn using OpenID Connect. This grants the openid, profile, and email scopes the login flow needs. Approval is usually immediate.
4

Add the redirect URL

Open the Auth tab. Under OAuth 2.0 settings → Authorized redirect URLs for your app, add your callback from Step 1: https://YOUR_DOMAIN/auth/linkedin/callback. Save.
5

Confirm the scopes

Still on the Auth tab, verify the app has the openid, profile, and email scopes (added by the OpenID Connect product).
6

Copy the credentials

On the Auth tab, copy the Client ID and Client Secret.

Step 3 — Configure MagicAds

1

Open Auth Settings

In your platform, go to Admin → Backend Settings → Auth Settings.
2

Enable the master switch

Turn on Social Media Login. This is the master switch for all social providers, and it saves immediately.
3

Enable LinkedIn and enter credentials

Turn on the LinkedIn toggle, then fill in:
  • API Key → paste your LinkedIn Client ID.
  • API Secret → paste your LinkedIn Client Secret.
  • Callback URL → enter https://YOUR_DOMAIN/auth/linkedin/callback (must match the Authorized redirect URL exactly).
4

Save

Click Save. LinkedIn only appears as a login option once it’s enabled and both the API Key and API Secret are filled in.

Field mapping reference

MagicAds fieldLinkedIn value
API KeyClient ID
API SecretClient Secret
Callback URLAuthorized redirect URL (/auth/linkedin/callback)

Step 4 — Test it

  1. Open your site’s login page in a private/incognito window.
  2. Click Sign in with LinkedIn.
  3. Approve the LinkedIn consent screen.
  4. You should be redirected back and logged into your dashboard.
That’s it — your users can now register and log in with LinkedIn.

Troubleshooting

SymptomLikely causeFix
”The redirect_uri does not match the registered value”Redirect URL mismatchMake the Authorized redirect URL in LinkedIn exactly equal the Callback URL in Auth Settings.
”Scope not authorized” / missing emailOpenID Connect product not addedAdd Sign In with LinkedIn using OpenID Connect under the app’s Products tab to get openid, profile, email.
LinkedIn button doesn’t appearMaster switch off, LinkedIn toggle off, or credentials blankEnable Social Media Login and LinkedIn, and fill both API Key and API Secret.
”Your social account did not share an email address”email scope missingEnsure the OpenID Connect product (with the email scope) is enabled on the app.
Can’t create the appNo associated Company PageCreate or get admin access to a LinkedIn Company Page and associate it with the app.
”Registration is currently closed” after approvalNew-user creation blockedEnable public registration in your platform settings, or pre-create the account.
This integration uses LinkedIn’s current OpenID Connect flow, not the deprecated legacy LinkedIn OAuth. Credentials are stored securely and applied at runtime; no .env edits are needed.