5

We had Login with LinkedIn code set up and working perfectly with LinkedIn Javascript SDK, where a few days ago we suddenly started to get this:

Blocked a frame with origin "https://platform.linkedin.com" from accessing a frame
with origin "https://OUR_SITE". Protocols, domains, and ports must match.

And login does not complete (it returns from LinkedIn to our page and waits forever). I have no idea why we started to get this error when everything was working perfectly (we haven't changed a single line of code about the login mechanism, or allow origin headers/files, or LinkedIn settings etc) but I decided to add platform.linkedin.com to allow origin header:

Access-Control-Allow-Origin: https://platform.linkedin.com

I can see the header sent in response correctly. However, I'm still getting the very same error.

Why did this start happening and how can we prevent this? I mean, I know Microsoft bought LinkedIn but come on, they can't break it that fast.

sideshowbarker
  • 62,215
  • 21
  • 143
  • 153
Can Poyrazoğlu
  • 29,145
  • 40
  • 152
  • 327

1 Answers1

1

Seems like it's broken forever.

I've ended up giving up on LinkedIn SDK completely, and using vanilla JS to open up a window, check for it's events, redirect back to my own domain (to be able to read window location and not hit into a browser sandbox) and read the token from there and use the token to manually do whatever I do.

I've never seen a company care less about their own developer platform, but again, at least, as a developer I can tell you that you can implement the "Login with LinkedIn" mechanism by hand.

Can Poyrazoğlu
  • 29,145
  • 40
  • 152
  • 327
  • Hi there, I have a similar problem but only on mobile web (for some strange reason it works on desktop). Can you explain a bit more in detail how to solve it? Cheers – Dave Jun 25 '17 at 15:51
  • @Dave I'd try to help (but I've stopped working on that project) but I need to know what your problem is. perhaps you could open a new question (if the problem not is an exact duplicate/this question/answer doesn't answer your case) and add a link to that as a comment – Can Poyrazoğlu Jun 25 '17 at 17:35