You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?