Ad
Retrieve Linkedin User’s Information
I’m currently developing a NodeJS App and am intending to retrieve Linkedin user’s experience, education and skills. When doing so I get the error below. How can I avoid this error?
Here the workflow followed that leads to the error: http://3.14.113.64:4000/
InternalOAuthError: failed to fetch user profile
at _oauth2.get (/linkedin-connection/node_modules/passport-linkedin-oauth2/lib/oauth2.js:70:23)
at passBackControl (/linkedin-connection/node_modules/oauth/lib/oauth2.js:132:9)
at IncomingMessage.<anonymous> (/linkedin-connection/node_modules/oauth/lib/oauth2.js:157:7)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
Ad
Answer
Looks like this is a known issue of this library: https://github.com/auth0/passport-linkedin-oauth2/issues/75
this module that has not been updated to linkedin API 2.0 as reported in this issue
Switch this for fork:
npm install @sokratis/passport-linkedin-oauth2
And replace the require / import statement:
var LinkedInStrategy = require('@sokratis/passport-linkedin-oauth2').Strategy;
Ad
source: stackoverflow.com
Related Questions
- → Maximum call stack exceeded when instantiating class inside of a module
- → Browserify api: how to pass advanced option to script
- → Node.js Passing object from server.js to external modules?
- → gulp-rename makes copies, but does not replace
- → requiring RX.js in node.js
- → Remove an ObjectId from an array of objectId
- → Can not connect to Redis
- → React: How to publish page on server using React-starter-kit
- → Express - better pattern for passing data between middleware functions
- → Can't get plotly + node.js to stream data coming through POST requests
- → IsGenerator implementation
- → Async/Await not waiting
- → (Socket.io on nodejs) Updating div with mysql data stops without showing error
Ad