LinkedIn OAuth

LinkedIn OpenID Connect userinfo with PKCE.

Overview

LinkedIn integration uses the OIDC /userinfo endpoint. PKCE (S256) is on by default.

Environment

# .env.local
AUTH_SECRET=your-secret-key-min-32-chars-long
LINKEDIN_CLIENT_ID=your-linkedin-client-id
LINKEDIN_CLIENT_SECRET=your-linkedin-client-secret
LINKEDIN_REDIRECT_URI=http://localhost:3000/api/auth/callback/linkedin

Configuration

Basic LinkedIn OAuth Setup

Minimal configuration

import { linkedin } from '@warpy-auth-sdk/core';

const provider = linkedin({
  clientId: process.env.LINKEDIN_CLIENT_ID!,
  clientSecret: process.env.LINKEDIN_CLIENT_SECRET!,
  redirectUri: process.env.LINKEDIN_REDIRECT_URI!,
  scope: ['openid', 'profile', 'email'],
});

Scopes

LinkedIn requires OpenID scopes to access the userinfo endpoint.
LinkedIn OAuth | @warpy-auth-sdk/core