generators/app/templates/server/lib/auth(auth)/auth.service.js
function signToken(id, role) {
  return jwt.sign({_id: id, role: role}, config.secrets.session, {expiresInMinutes: 60 * 5});
}
function signToken(id, role) {
  return jwt.sign({_id: id, role: role}, config.secrets.session, {expiresInMinutes: 60 * 5});
}
function signToken ( id , role ) { return jwt . sign ( { _id : id , role : role } , config . secrets . session , { expiresInMinutes : 60 * 5 } ) ; }
Returns a jwt token signed by the app secret
@param {String} id - Id used to sign a token
@return {String}
Returns a jwt token signed by the app secret