Search code examples
oauth-2.0linkedin-api

iPhone OAuth login request redirects to App not Browser, doesn't work


My current scenario is:

  • Running an iPhone on the latest iOS
  • LinkedIn App is installed and logged in
  • Web browser is NOT logged into LinkedIn (because I have the app)
  • Developing a web app with "log in with LinkedIn" functionality

On the iPhone, clicking the "log in with LinkedIn" button redirects me straight the the LinkedIn App, which subsequently does nothing - just shows me my feed. I have verified this same behaviour occurs on a third-party site as well as my own. Note that Android exhibits similar behaviour, though I haven't tested as extensively there.

I've found several workarounds:

  • If I open the web site in Private Browsing mode clicking the login button asks me if I want to open the App or stay in the browser.
  • If I long-press and "Open in background tab" the login button it'll open (in the background, of course) instead of redirecting to the app, allowing me to log in.
  • If I manually type "linkedin.com" into the browser and log in then it seems to work too.

None of these are even vaguely practical for end users, essentially forcing us to remove the option entirely.

I'm fairly sure this is a problem at LinkedIn's end and the solution is either:

  • Don't redirect to the App for OAuth Authorize requests, or
  • Make the App correctly handle OAuth Authorize requests.

If I'm incorrect and there's some way we can stop this redirect from the client side I'd be happy to hear, otherwise I hope LinkedIn engineers actually see this...


Solution

  • See the comments in Issues with Linkedin Social connection

    LinkedIn already confirmed that it is a problem on their side.