Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linkedin Oauth Javascript authorization "uh oh!"

I can't login on my app with Linkedin, i see modal linked dialog with "uh oh!" What to do? Why don't work linkedin Oauth?

function onLinkedInLoad() {
  IN.Event.on(IN, "auth", function() {onLinkedInLogin();});
  IN.Event.on(IN, "logout", function() {onLinkedInLogout();});
}
function onLinkedInLogin() {
  IN.API.Profile("me")
    .fields(["id", "firstName", "lastName", "pictureUrl", "publicProfileUrl", "emailAddress"])
    .result(function(result) {

      console.log(firstName);
    })
    .error(function(err) {
      alert(err);
    });
}
function liAuth(){
  // 
   IN.User.authorize(function(){
       callback();
   });
   //IN.UI.Authorize().place();
}
<script type="text/javascript" src="https://platform.linkedin.com/in.js">
    api_key: 54545645645646
    authorize: false
    onLoad: onLinkedInLoad
</script>

<div onclick="liAuth()" class="loginsocbutton loginsocbutton__in" id="oauth_linkedin">click</div>
like image 305
trigger Avatar asked May 13 '15 12:05

trigger


2 Answers

You need to go to your applications permissions immediately and uncheck all boxes except the 4 that appear in this screenshot. I was able to get my integration working again after that.

enter image description here

They seem to not be handling revoked permissions very gracefully. You, like us, were probably not using those extra permissions anyways.

like image 164
Throttlehead Avatar answered Nov 03 '22 17:11

Throttlehead


A change in LinkedIns API was rolled out today wrecking code everywhere.

you can read about it here:

https://developer.linkedin.com/blog https://developer.linkedin.com/partner-programs

like image 23
John M Avatar answered Nov 03 '22 16:11

John M