Custom Callback Route for Linkedin using Passportjs

Hi,

I’m trying to create api using MEAN and PassportJs. I’m stuck with linkedin callback route.
Trying to create end points, but Linkedin Strategy provides this

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

I’m looking for something like this

app.get('/auth/linkedin/callback', passport.authenticate('linkedin', function(err, user, info){
if(err)
  throw err;
res.json(user);
}));

What am I missing here??