1. Create an app Go to LinkedIn Developer Portal → Create app. Associate it with a Company Page if required.
2. OAuth settings Add redirect URL: `{NEXTAUTH_URL}/api/auth/linkedin/callback`
Example: `https://app.goals.ac/api/auth/linkedin/callback`
3. Products / scopes Enable Share on LinkedIn and Sign In with LinkedIn. Required scopes used by goals.ac:
- `openid`
- `profile`
- `w_member_social`
- `email`
4. Credentials (pick one)
A. Platform Admin (recommended) `/admin/integrations` → Social → LinkedIn → paste Client ID + Secret → Save. Keep social publishing enabled.
B. Environment variables ``` LINKEDIN_CLIENT_ID=your_client_id LINKEDIN_CLIENT_SECRET=your_client_secret NEXTAUTH_URL=https://app.goals.ac ``` If env vars are set, they override admin values and the admin dialog is read-only.
Restart the Next.js app after updating `.env`. Admin-saved credentials apply without a restart.