-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
📜 Description
LinkedIn integration (both personal profile and LinkedIn Page) fails during the OAuth callback process.
After successful OAuth authentication, Postiz attempts to fetch the user's profile picture from
LinkedIn's CDN, which returns a 403 Forbidden error. This causes the entire integration to fail and the
LinkedIn account is not added to Postiz.
👟 Reproduction steps
Reproduction steps:
- Go to Postiz dashboard
- Click on "Add Channel"
- Select either "LinkedIn" or "LinkedIn Page"
- Complete OAuth authentication on LinkedIn (successfully)
- Get redirected back to Postiz
- See error message: "Could not add provider. You are being redirected back"
- Check logs to see: "AxiosError: Request failed with status code 403" at LocalStorage.uploadSimple
👍 Expected behavior
After OAuth authentication, the LinkedIn integration should be saved successfully, even if the profile
picture cannot be fetched. The integration should handle profile picture fetch failures gracefully and
continue with the integration setup.
👎 Actual Behavior with Screenshots
The integration fails completely when LinkedIn's CDN returns 403 for profile picture access. Error in
logs:
[ERROR] [ExceptionsHandler] Request failed with status code 403
AxiosError: Request failed with status code 403
at async LocalStorage.uploadSimple
(/app/apps/backend/dist/libraries/nestjs-libraries/src/upload/local.storage.js:14:27)
at async IntegrationService.createOrUpdateIntegration (/app/apps/backend/dist/libraries/nestjs-libra
ries/src/database/prisma/integrations/integration.service.js:54:19)
The integration is not saved and users cannot connect their LinkedIn accounts.
💻 Operating system
Linux
🤖 Node Version
Node 20.18.1 (as per container environment)
📃 Provide any additional context for the Bug.
- Postiz version: v2.5.4 (using ghcr.io/gitroomhq/postiz-app:latest)
- LinkedIn App configuration is correct with proper redirect URIs
- OAuth authentication completes successfully
- Issue occurs when trying to fetch/save profile picture from LinkedIn
- LinkedIn has restricted access to profile pictures via their CDN
- Affects both personal LinkedIn and LinkedIn Page integrations
- Environment variables properly configured:
- LINKEDIN_CLIENT_ID and LINKEDIN_CLIENT_SECRET are set
- All URLs (FRONTEND_URL, BACKEND_URL, etc.) are correctly configured
- This appears to be related to LinkedIn's API changes regarding profile picture access
👀 Have you spent some time to check if this bug has been raised before?
- I checked and didn't find similar issue
Are you willing to submit PR?
None