IN.User.Authorize callback never fired
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
Since today, our application that uses the linkedin javascript SDK to authenticate users stopped working.
We realized that the call to https://platform.linkedin.com/in.js now redirects to https://platform.linkedin.com/xdoor/scripts/in.js.
Consequently, calls to IN.User.Authorize(callbackFunction)
successfully opens the authentication dialog window but the callback is never fired anymore.
Also, in another part of our application we are using the IN.UI.Authorize.place().onWindowRemove.subscribe(callbackFunction)
to track dialog closes. This feature has also stopped wording and now opens a new window with the url invalid://
and the console throws this error:
jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. TODO?client_id=XXXX&type=user-agent in.js:7
jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. invalid://?xdOrigin=https%3A%2F%2FXXX-XXX&xdChannel=XXXX&xd_origin_host=https%3A%2F%2FXXXX.XXXX in.js:7
jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. TODO?client_id=XXXX&type=user-agent
Do you have an idea on why this stopped working ?
EDIT: Bug reappeared as of 2019 01 28.
linkedin linkedin-api linkedin-jsapi linkedin-j
|
show 2 more comments
Since today, our application that uses the linkedin javascript SDK to authenticate users stopped working.
We realized that the call to https://platform.linkedin.com/in.js now redirects to https://platform.linkedin.com/xdoor/scripts/in.js.
Consequently, calls to IN.User.Authorize(callbackFunction)
successfully opens the authentication dialog window but the callback is never fired anymore.
Also, in another part of our application we are using the IN.UI.Authorize.place().onWindowRemove.subscribe(callbackFunction)
to track dialog closes. This feature has also stopped wording and now opens a new window with the url invalid://
and the console throws this error:
jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. TODO?client_id=XXXX&type=user-agent in.js:7
jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. invalid://?xdOrigin=https%3A%2F%2FXXX-XXX&xdChannel=XXXX&xd_origin_host=https%3A%2F%2FXXXX.XXXX in.js:7
jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. TODO?client_id=XXXX&type=user-agent
Do you have an idea on why this stopped working ?
EDIT: Bug reappeared as of 2019 01 28.
linkedin linkedin-api linkedin-jsapi linkedin-j
We are having the same issues, along with many others errors that were previously working. We have not made code changes on our end, but a lot of functionality is currently broken. The sdk code has changed quite a bit this week, which you can see through the web archive web.archive.org/web*/platform.linkedin.com/in.js
– a.stringham
Nov 15 '18 at 16:25
1
I'm receiving this error message: "Unhandled Promise Rejection: TypeError: null is not an object (evaluating 'this.self.location.replace')" which points to line 1434 inin.js
and the offending code: ` return l()(e, t), a()(e, [ key: "reload", value: function() this.self.location.replace(P.call(this)), D.call(this) ]), e `
– tupakapoor
Nov 15 '18 at 17:19
same issue here. same error as @tupakapoor.
– Cody Sand
Nov 15 '18 at 22:46
This appears to be working now!
– tupakapoor
Nov 16 '18 at 6:33
Same issue right now, just appeared on Jan 28th, 2018, was working prior.
– Orun
Jan 28 at 16:40
|
show 2 more comments
Since today, our application that uses the linkedin javascript SDK to authenticate users stopped working.
We realized that the call to https://platform.linkedin.com/in.js now redirects to https://platform.linkedin.com/xdoor/scripts/in.js.
Consequently, calls to IN.User.Authorize(callbackFunction)
successfully opens the authentication dialog window but the callback is never fired anymore.
Also, in another part of our application we are using the IN.UI.Authorize.place().onWindowRemove.subscribe(callbackFunction)
to track dialog closes. This feature has also stopped wording and now opens a new window with the url invalid://
and the console throws this error:
jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. TODO?client_id=XXXX&type=user-agent in.js:7
jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. invalid://?xdOrigin=https%3A%2F%2FXXX-XXX&xdChannel=XXXX&xd_origin_host=https%3A%2F%2FXXXX.XXXX in.js:7
jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. TODO?client_id=XXXX&type=user-agent
Do you have an idea on why this stopped working ?
EDIT: Bug reappeared as of 2019 01 28.
linkedin linkedin-api linkedin-jsapi linkedin-j
Since today, our application that uses the linkedin javascript SDK to authenticate users stopped working.
We realized that the call to https://platform.linkedin.com/in.js now redirects to https://platform.linkedin.com/xdoor/scripts/in.js.
Consequently, calls to IN.User.Authorize(callbackFunction)
successfully opens the authentication dialog window but the callback is never fired anymore.
Also, in another part of our application we are using the IN.UI.Authorize.place().onWindowRemove.subscribe(callbackFunction)
to track dialog closes. This feature has also stopped wording and now opens a new window with the url invalid://
and the console throws this error:
jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. TODO?client_id=XXXX&type=user-agent in.js:7
jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. invalid://?xdOrigin=https%3A%2F%2FXXX-XXX&xdChannel=XXXX&xd_origin_host=https%3A%2F%2FXXXX.XXXX in.js:7
jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. TODO?client_id=XXXX&type=user-agent
Do you have an idea on why this stopped working ?
EDIT: Bug reappeared as of 2019 01 28.
linkedin linkedin-api linkedin-jsapi linkedin-j
linkedin linkedin-api linkedin-jsapi linkedin-j
edited Jan 29 at 9:13
user93
31
31
asked Nov 15 '18 at 16:20
klacointeklacointe
392
392
We are having the same issues, along with many others errors that were previously working. We have not made code changes on our end, but a lot of functionality is currently broken. The sdk code has changed quite a bit this week, which you can see through the web archive web.archive.org/web*/platform.linkedin.com/in.js
– a.stringham
Nov 15 '18 at 16:25
1
I'm receiving this error message: "Unhandled Promise Rejection: TypeError: null is not an object (evaluating 'this.self.location.replace')" which points to line 1434 inin.js
and the offending code: ` return l()(e, t), a()(e, [ key: "reload", value: function() this.self.location.replace(P.call(this)), D.call(this) ]), e `
– tupakapoor
Nov 15 '18 at 17:19
same issue here. same error as @tupakapoor.
– Cody Sand
Nov 15 '18 at 22:46
This appears to be working now!
– tupakapoor
Nov 16 '18 at 6:33
Same issue right now, just appeared on Jan 28th, 2018, was working prior.
– Orun
Jan 28 at 16:40
|
show 2 more comments
We are having the same issues, along with many others errors that were previously working. We have not made code changes on our end, but a lot of functionality is currently broken. The sdk code has changed quite a bit this week, which you can see through the web archive web.archive.org/web*/platform.linkedin.com/in.js
– a.stringham
Nov 15 '18 at 16:25
1
I'm receiving this error message: "Unhandled Promise Rejection: TypeError: null is not an object (evaluating 'this.self.location.replace')" which points to line 1434 inin.js
and the offending code: ` return l()(e, t), a()(e, [ key: "reload", value: function() this.self.location.replace(P.call(this)), D.call(this) ]), e `
– tupakapoor
Nov 15 '18 at 17:19
same issue here. same error as @tupakapoor.
– Cody Sand
Nov 15 '18 at 22:46
This appears to be working now!
– tupakapoor
Nov 16 '18 at 6:33
Same issue right now, just appeared on Jan 28th, 2018, was working prior.
– Orun
Jan 28 at 16:40
We are having the same issues, along with many others errors that were previously working. We have not made code changes on our end, but a lot of functionality is currently broken. The sdk code has changed quite a bit this week, which you can see through the web archive web.archive.org/web*/platform.linkedin.com/in.js
– a.stringham
Nov 15 '18 at 16:25
We are having the same issues, along with many others errors that were previously working. We have not made code changes on our end, but a lot of functionality is currently broken. The sdk code has changed quite a bit this week, which you can see through the web archive web.archive.org/web*/platform.linkedin.com/in.js
– a.stringham
Nov 15 '18 at 16:25
1
1
I'm receiving this error message: "Unhandled Promise Rejection: TypeError: null is not an object (evaluating 'this.self.location.replace')" which points to line 1434 in
in.js
and the offending code: ` return l()(e, t), a()(e, [ key: "reload", value: function() this.self.location.replace(P.call(this)), D.call(this) ]), e `– tupakapoor
Nov 15 '18 at 17:19
I'm receiving this error message: "Unhandled Promise Rejection: TypeError: null is not an object (evaluating 'this.self.location.replace')" which points to line 1434 in
in.js
and the offending code: ` return l()(e, t), a()(e, [ key: "reload", value: function() this.self.location.replace(P.call(this)), D.call(this) ]), e `– tupakapoor
Nov 15 '18 at 17:19
same issue here. same error as @tupakapoor.
– Cody Sand
Nov 15 '18 at 22:46
same issue here. same error as @tupakapoor.
– Cody Sand
Nov 15 '18 at 22:46
This appears to be working now!
– tupakapoor
Nov 16 '18 at 6:33
This appears to be working now!
– tupakapoor
Nov 16 '18 at 6:33
Same issue right now, just appeared on Jan 28th, 2018, was working prior.
– Orun
Jan 28 at 16:40
Same issue right now, just appeared on Jan 28th, 2018, was working prior.
– Orun
Jan 28 at 16:40
|
show 2 more comments
2 Answers
2
active
oldest
votes
Try replacing window.IN.User.authorize with window.IN.user.authorize
window.IN.user.authorize is returning a promise and success callback is executed post login success. Its weird but working if we replace User with user
window.IN.user.authorize().then(function(data)
console.log("Logged in successfully .");
window.IN.API.Raw("/people/~:(id,first-name,last-name,formatted-name,headline,location,industry,current-share,num-connections,num-connections-capped,summary,specialties,positions,picture-url,site-standard-profile-request,api-standard-profile-request,public-profile-url,email-address)").method("GET").body().result(function (oData)
that.props.dispatch(userCreation(linkedInProfileFormat(oData)));
);
,function(error)
alert("Linkedin failed because of harshita !");
);
add a comment |
Try this code. I did some changes and working fine for me. need to replace window.IN.User.authorize() TO window.IN.user.authorize()
<script type="text/javascript" src="//platform.linkedin.com/in.js">
api_key: XXXXXXXXX
authorize: true
</script>
<script type="text/javascript">
function liAuth()
window.IN.user.authorize().then(function()
getProfileData();
);
function setLoginBadge(profile)
if (!profile)
profHTML = "<p>You are not logged in</p>";
document.getElementById("given_name").value = profile.firstName;
document.getElementById("family_name").value = profile.lastName;
document.getElementById("email").value = profile.emailAddress;
document.getElementById("verifyOauthRequestLinkedIn").submit();
function onError(error)
console.log(error);
function getProfileData()
IN.API.Profile("me")
.fields(["id", "firstName", "lastName", "pictureUrl", "publicProfileUrl","email-address","headline"])
.result(function(result)
setLoginBadge(result.values[0]);
)
.error(onError);
</script>
<a href="#"><img onclick="liAuth()" src="/images/linkedIn.png"></a>
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53323724%2fin-user-authorize-callback-never-fired%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try replacing window.IN.User.authorize with window.IN.user.authorize
window.IN.user.authorize is returning a promise and success callback is executed post login success. Its weird but working if we replace User with user
window.IN.user.authorize().then(function(data)
console.log("Logged in successfully .");
window.IN.API.Raw("/people/~:(id,first-name,last-name,formatted-name,headline,location,industry,current-share,num-connections,num-connections-capped,summary,specialties,positions,picture-url,site-standard-profile-request,api-standard-profile-request,public-profile-url,email-address)").method("GET").body().result(function (oData)
that.props.dispatch(userCreation(linkedInProfileFormat(oData)));
);
,function(error)
alert("Linkedin failed because of harshita !");
);
add a comment |
Try replacing window.IN.User.authorize with window.IN.user.authorize
window.IN.user.authorize is returning a promise and success callback is executed post login success. Its weird but working if we replace User with user
window.IN.user.authorize().then(function(data)
console.log("Logged in successfully .");
window.IN.API.Raw("/people/~:(id,first-name,last-name,formatted-name,headline,location,industry,current-share,num-connections,num-connections-capped,summary,specialties,positions,picture-url,site-standard-profile-request,api-standard-profile-request,public-profile-url,email-address)").method("GET").body().result(function (oData)
that.props.dispatch(userCreation(linkedInProfileFormat(oData)));
);
,function(error)
alert("Linkedin failed because of harshita !");
);
add a comment |
Try replacing window.IN.User.authorize with window.IN.user.authorize
window.IN.user.authorize is returning a promise and success callback is executed post login success. Its weird but working if we replace User with user
window.IN.user.authorize().then(function(data)
console.log("Logged in successfully .");
window.IN.API.Raw("/people/~:(id,first-name,last-name,formatted-name,headline,location,industry,current-share,num-connections,num-connections-capped,summary,specialties,positions,picture-url,site-standard-profile-request,api-standard-profile-request,public-profile-url,email-address)").method("GET").body().result(function (oData)
that.props.dispatch(userCreation(linkedInProfileFormat(oData)));
);
,function(error)
alert("Linkedin failed because of harshita !");
);
Try replacing window.IN.User.authorize with window.IN.user.authorize
window.IN.user.authorize is returning a promise and success callback is executed post login success. Its weird but working if we replace User with user
window.IN.user.authorize().then(function(data)
console.log("Logged in successfully .");
window.IN.API.Raw("/people/~:(id,first-name,last-name,formatted-name,headline,location,industry,current-share,num-connections,num-connections-capped,summary,specialties,positions,picture-url,site-standard-profile-request,api-standard-profile-request,public-profile-url,email-address)").method("GET").body().result(function (oData)
that.props.dispatch(userCreation(linkedInProfileFormat(oData)));
);
,function(error)
alert("Linkedin failed because of harshita !");
);
answered Jan 30 at 15:15
NavyCodyNavyCody
470210
470210
add a comment |
add a comment |
Try this code. I did some changes and working fine for me. need to replace window.IN.User.authorize() TO window.IN.user.authorize()
<script type="text/javascript" src="//platform.linkedin.com/in.js">
api_key: XXXXXXXXX
authorize: true
</script>
<script type="text/javascript">
function liAuth()
window.IN.user.authorize().then(function()
getProfileData();
);
function setLoginBadge(profile)
if (!profile)
profHTML = "<p>You are not logged in</p>";
document.getElementById("given_name").value = profile.firstName;
document.getElementById("family_name").value = profile.lastName;
document.getElementById("email").value = profile.emailAddress;
document.getElementById("verifyOauthRequestLinkedIn").submit();
function onError(error)
console.log(error);
function getProfileData()
IN.API.Profile("me")
.fields(["id", "firstName", "lastName", "pictureUrl", "publicProfileUrl","email-address","headline"])
.result(function(result)
setLoginBadge(result.values[0]);
)
.error(onError);
</script>
<a href="#"><img onclick="liAuth()" src="/images/linkedIn.png"></a>
add a comment |
Try this code. I did some changes and working fine for me. need to replace window.IN.User.authorize() TO window.IN.user.authorize()
<script type="text/javascript" src="//platform.linkedin.com/in.js">
api_key: XXXXXXXXX
authorize: true
</script>
<script type="text/javascript">
function liAuth()
window.IN.user.authorize().then(function()
getProfileData();
);
function setLoginBadge(profile)
if (!profile)
profHTML = "<p>You are not logged in</p>";
document.getElementById("given_name").value = profile.firstName;
document.getElementById("family_name").value = profile.lastName;
document.getElementById("email").value = profile.emailAddress;
document.getElementById("verifyOauthRequestLinkedIn").submit();
function onError(error)
console.log(error);
function getProfileData()
IN.API.Profile("me")
.fields(["id", "firstName", "lastName", "pictureUrl", "publicProfileUrl","email-address","headline"])
.result(function(result)
setLoginBadge(result.values[0]);
)
.error(onError);
</script>
<a href="#"><img onclick="liAuth()" src="/images/linkedIn.png"></a>
add a comment |
Try this code. I did some changes and working fine for me. need to replace window.IN.User.authorize() TO window.IN.user.authorize()
<script type="text/javascript" src="//platform.linkedin.com/in.js">
api_key: XXXXXXXXX
authorize: true
</script>
<script type="text/javascript">
function liAuth()
window.IN.user.authorize().then(function()
getProfileData();
);
function setLoginBadge(profile)
if (!profile)
profHTML = "<p>You are not logged in</p>";
document.getElementById("given_name").value = profile.firstName;
document.getElementById("family_name").value = profile.lastName;
document.getElementById("email").value = profile.emailAddress;
document.getElementById("verifyOauthRequestLinkedIn").submit();
function onError(error)
console.log(error);
function getProfileData()
IN.API.Profile("me")
.fields(["id", "firstName", "lastName", "pictureUrl", "publicProfileUrl","email-address","headline"])
.result(function(result)
setLoginBadge(result.values[0]);
)
.error(onError);
</script>
<a href="#"><img onclick="liAuth()" src="/images/linkedIn.png"></a>
Try this code. I did some changes and working fine for me. need to replace window.IN.User.authorize() TO window.IN.user.authorize()
<script type="text/javascript" src="//platform.linkedin.com/in.js">
api_key: XXXXXXXXX
authorize: true
</script>
<script type="text/javascript">
function liAuth()
window.IN.user.authorize().then(function()
getProfileData();
);
function setLoginBadge(profile)
if (!profile)
profHTML = "<p>You are not logged in</p>";
document.getElementById("given_name").value = profile.firstName;
document.getElementById("family_name").value = profile.lastName;
document.getElementById("email").value = profile.emailAddress;
document.getElementById("verifyOauthRequestLinkedIn").submit();
function onError(error)
console.log(error);
function getProfileData()
IN.API.Profile("me")
.fields(["id", "firstName", "lastName", "pictureUrl", "publicProfileUrl","email-address","headline"])
.result(function(result)
setLoginBadge(result.values[0]);
)
.error(onError);
</script>
<a href="#"><img onclick="liAuth()" src="/images/linkedIn.png"></a>
answered Feb 6 at 6:03
sumit katiyarsumit katiyar
366
366
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53323724%2fin-user-authorize-callback-never-fired%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
We are having the same issues, along with many others errors that were previously working. We have not made code changes on our end, but a lot of functionality is currently broken. The sdk code has changed quite a bit this week, which you can see through the web archive web.archive.org/web*/platform.linkedin.com/in.js
– a.stringham
Nov 15 '18 at 16:25
1
I'm receiving this error message: "Unhandled Promise Rejection: TypeError: null is not an object (evaluating 'this.self.location.replace')" which points to line 1434 in
in.js
and the offending code: ` return l()(e, t), a()(e, [ key: "reload", value: function() this.self.location.replace(P.call(this)), D.call(this) ]), e `– tupakapoor
Nov 15 '18 at 17:19
same issue here. same error as @tupakapoor.
– Cody Sand
Nov 15 '18 at 22:46
This appears to be working now!
– tupakapoor
Nov 16 '18 at 6:33
Same issue right now, just appeared on Jan 28th, 2018, was working prior.
– Orun
Jan 28 at 16:40