InternalOAuthError: failed to fetch user profile when using passport-linkedin-oauth2 #1008
Unanswered
innocentEdosa
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to implement LinkedIn social sign in using passport-linkedin-oauth2. following the documentation, this is a cut out of my code
``
passport.use(
new LinkedInStrategy(
{
clientID: "",
clientSecret: "",
callbackURL: ""
scope: ["openid", "email", "profile"],
state: true,
},
async (accessToken, refreshToken, profile, done) => {
done(null, profile)
},
),
)
``
The process to enter the user's LinkedIn credentials is triggered but when my application is granted permissions, I get this error
InternalOAuthError: failed to fetch user profile
at Strategy. (/opt/backend/node_modules/passport-linkedin-oauth2/lib/oauth2.js:57:19)
at passBackControl (/opt/backend/node_modules/oauth/lib/oauth2.js:132:9)
at IncomingMessage. (/opt/backend/node_modules/oauth/lib/oauth2.js:157:7)
at IncomingMessage.emit (node:events:525:35)
at IncomingMessage.emit (node:domain:489:12)
at endReadableNT (node:internal/streams/readable:1358:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Beta Was this translation helpful? Give feedback.
All reactions