Skip to content

LinkedIn

LinkedIn is an OIDC preset shipped from v0.5 of authn.sh. LinkedIn exposes the standard OIDC discovery document, so the preset is wired as custom_oidc under the hood with the issuer auto-resolved.

ScopeReturns
openidRequired by OIDC.
profileLinkedIn sub (user id), name, given_name, family_name, picture.
emailEmail + email_verified.
  1. Open LinkedIn Developers → My Apps and click Create app.
  2. Fill out the form (app name, associated company page, app logo). Confirm.
  3. Open Products and add Sign In with LinkedIn using OpenID Connect. Approval is usually immediate.
  4. Open AuthOAuth 2.0 settings. Paste the redirect_uri from your authn.sh OauthProvider row — https://<env_slug>.authn.sh/v1/oauth-callback/linkedin — into Authorized redirect URLs for your app. Save.
  5. Copy Client ID and Client Secret from the same screen.
POST /v1/oauth-providers
Authorization: Bearer sk_live_…
Content-Type: application/json
{
"provider_kind": "preset",
"provider_key": "linkedin",
"name": "LinkedIn",
"client_id": "861234567890ab",
"client_secret": "your-linkedin-client-secret-here"
}

Preset defaults — no override needed for the common case:

authn.sh fieldLinkedIn claim
email_addressemail
first_namegiven_name
last_namefamily_name
provider_user_idsub
profile_image_urlpicture
  • LinkedIn returns email_verified: true for every email surfaced via the OIDC userinfo endpoint — they only return the user’s primary, verified address.
  • The legacy “Sign In with LinkedIn v1” product (non-OIDC) is not what this preset uses; make sure the OpenID Connect variant is added to your LinkedIn app, otherwise the discovery document won’t resolve and the test button returns oauth_discovery_failed.