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://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
Step 4 — Test it
- Open your site’s login page in a private/incognito window.
- Click Sign in with LinkedIn.
- Approve the LinkedIn consent screen.
- You should be redirected back and logged into your dashboard.
That’s it — your users can now register and log in with LinkedIn.
Troubleshooting
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.
