Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TokenError: Client authentication failed #64

Open
tjstalcup opened this issue Jan 8, 2019 · 5 comments
Open

TokenError: Client authentication failed #64

tjstalcup opened this issue Jan 8, 2019 · 5 comments

Comments

@tjstalcup
Copy link

Routes:
` app.get('/auth/linkedin', passport.authenticate('linkedin'));

app.get('/auth/linkedin/callback', passport.authenticate('linkedin', {
successRedirect: '/profile',
failureRedirect: '/'
}));`

Strategy:
passport.use(new LinkedInStrategy({ clientID: "XXXXX", clientSecret: "XXXX", callbackURL: "http://localhost:8080/auth/linkedin/callback", scope: ['r_emailaddress', 'r_basicprofile'], state: true }, function(accessToken, refreshToken, profile, done) { console.log('profile---',profile); User.findOrCreate({ linkedinId: profile.id }, function (err, user) { return done(err, user); }); } ));

I'm not seeing the console.log just the following error message:

TokenError: Client authentication failed at Strategy.OAuth2Strategy.parseErrorResponse (/Users/tjstalcup/Sites/devjobs/node_modules/passport-oauth2/lib/strategy.js:329:12) at Strategy.OAuth2Strategy._createOAuthError (/Users/tjstalcup/Sites/devjobs/node_modules/passport-oauth2/lib/strategy.js:376:16) at /Users/tjstalcup/Sites/devjobs/node_modules/passport-oauth2/lib/strategy.js:166:45 at /Users/tjstalcup/Sites/devjobs/node_modules/oauth/lib/oauth2.js:191:18 at passBackControl (/Users/tjstalcup/Sites/devjobs/node_modules/oauth/lib/oauth2.js:132:9) at IncomingMessage.<anonymous> (/Users/tjstalcup/Sites/devjobs/node_modules/oauth/lib/oauth2.js:157:7) at IncomingMessage.emit (events.js:187:15) at endReadableNT (_stream_readable.js:1098:12) at process.internalTickCallback (internal/process/next_tick.js:72:19)

@ShweYeeMyaWin
Copy link

I am facing the same problem as well. Any suggestion about this issue ?

@catrawalkar
Copy link

Did you find a solution to this? I still not able to pass through it. Please help

@CajetanRodrigues
Copy link

Im also stuck

@YuraGB
Copy link

YuraGB commented Jun 6, 2020

The question was asked from January 2019 and the issue appears and appears.....

@ghost
Copy link

ghost commented Oct 25, 2020

Go to the Products tab and add Sign in with Linkedin, which allows you to sign in with your professional identity. Doesn't look seem to be mentioned in their docs. Once approved it will be added to Products.

https://stackoverflow.com/questions/53479131/unauthorized-scope-error-in-linkedin-oauth2-authentication

linkedin

Let me know if that helps...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants