LinkedIn OAuth2 Authentication Not Working with Self-Hosted n8n Setup

I’m having trouble getting LinkedIn OAuth2 to work with my n8n instance and could really use some help.

My Setup:

  • Running n8n in a Docker container on Raspberry Pi
  • Using Cloudflare Tunnel for external access
  • HTTPS is working fine on port 443
  • Domain is accessible from outside
  • Created LinkedIn developer app with proper client credentials
  • Added the OAuth redirect URL to LinkedIn app settings

The Issue:
When I try to authenticate with LinkedIn through n8n, it takes me to LinkedIn’s site but then shows an error saying “Your LinkedIn Network Will Be Back Soon” with a message about notifying operations staff. This happens every time and stops the OAuth flow from finishing.

What I’ve Tried:

  • Double checked that my redirect URL is correct and publicly accessible
  • Verified all LinkedIn app settings match my n8n configuration
  • Other OAuth integrations work fine in the same setup
  • LinkedIn support looked at it but couldn’t find the problem

Questions:

  • Has anyone got LinkedIn OAuth working with self-hosted n8n behind Cloudflare?
  • Could this be a Docker networking issue?
  • Are there special LinkedIn app permissions I might be missing?

Any help would be great. I expected the normal OAuth flow where LinkedIn redirects back to n8n with the auth token, but instead I get stuck at that error page every time.

Double-check your LinkedIn app’s OAuth settings - the redirect URI needs to match exactly, including any trailing slash. I hit the same issue where LinkedIn threw that generic error when my callback URL didn’t perfectly match the app config. Also try switching your Cloudflare tunnel to a different region. Some of their exit points get flagged by LinkedIn’s anti-bot system.

Had the same issue with LinkedIn OAuth on my self-hosted n8n setup last year. That “LinkedIn Network Will Be Back Soon” error means LinkedIn’s blocking your OAuth requests - even if everything’s set up right technically. LinkedIn got way stricter about OAuth apps, especially ones running through proxy services like Cloudflare Tunnel. They flag certain IP ranges or traffic patterns as bots. I had to contact LinkedIn developer support directly and explain my specific use case to prove it was legit business automation, not scraping. Also check if your LinkedIn developer app has the right product access enabled. Basic “Sign In with LinkedIn” should work automatically, but if you need profile or company data, those require separate approval that takes days to process.

This is definitely LinkedIn’s fault, not your n8n setup. I hit the same issue when LinkedIn changed their security policies around mid-2023. That error shows up when LinkedIn thinks you’re using automation or weird routing - which Cloudflare Tunnel can trigger. Test your LinkedIn app on localhost first. If it works locally but breaks through Cloudflare, you’ve confirmed it’s the routing. Also check if your app’s verified in the LinkedIn Developer Portal. Unverified apps get hit with stricter limits and security checks that cause these generic error pages. You’ll need to submit your app for review with detailed explanations of what you’re doing. LinkedIn also blocks OAuth flows from certain regions, so if your Cloudflare nodes are hitting the wrong geographic areas, that could be causing the blocks.