The method signToken from auth.service.js is always called with two parameters:
var token = signToken(req.user._id, req.user.role);
(in /app/templates/server/auth(auth)/local/index.js line 15 or in /app/templates/server/auth(auth)/auth.service.js line 68)
But the function just accepts one parameter:
/**
* Returns a jwt token signed by the app secret
*/
function signToken(id) {
return jwt.sign({ _id: id }, config.secrets.session, { expiresInMinutes: 60*5 });
}
Where are the informations user.id and user.role extrated out of the token and then used?