GuidesAuth Providers
LinkedIn Auth
Add LinkedIn OAuth sign-in to your app.
Docs are in beta — content is improving rapidly. Found something missing? Open an issue on GitHub or reach out on Twitter (X).
1. Create a LinkedIn App
- Go to LinkedIn Developers and click Create App
- Fill in the required fields (app name, LinkedIn page, logo)
- After creation, go to the Auth tab
- Under OAuth 2.0 settings → Authorized redirect URLs for your app, add:
http://localhost:3000/api/auth/callback/linkedin(dev)https://yourdomain.com/api/auth/callback/linkedin(prod)
- Copy the Client ID and Client Secret from the Auth tab
Add the Sign In with LinkedIn Product
In the Products tab, find and request Sign In with LinkedIn using OpenID Connect.
Click Request Access
This is required to access the openid, profile, and email scopes.
2. Set Environment Variables
# .env.local
LINKEDIN_CLIENT_ID=your-client-id
LINKEDIN_CLIENT_SECRET=your-client-secret3. Enable in Config
In src/appConfig.ts set:
linkedin: { enabled: true },4. Test
- Run
pnpm dev - Navigate to
/auth/sign-in - A Sign in with LinkedIn button will appear
Production Checklist
- Ensure the Sign In with LinkedIn using OpenID Connect product is approved (usually instant)
- Add your production redirect URL to the app's authorized redirect URLs
Troubleshooting
- No email returned — LinkedIn's
emailclaim is optional and may be absent for members without a confirmed email address invalid_scope— make sure the Sign In with LinkedIn using OpenID Connect product is added to your app- No LinkedIn button — check
LINKEDIN_CLIENT_IDandLINKEDIN_CLIENT_SECRETare set andlinkedin.enabledistrue