diff --git a/app/templates/server/auth(auth)/auth.service.js b/app/templates/server/auth(auth)/auth.service.js index 86f781f84..faa2684cf 100644 --- a/app/templates/server/auth(auth)/auth.service.js +++ b/app/templates/server/auth(auth)/auth.service.js @@ -71,8 +71,8 @@ function hasRole(roleRequired) { /** * Returns a jwt token signed by the app secret */ -function signToken(id) { - return jwt.sign({ _id: id }, config.secrets.session, { +function signToken(id, role) { + return jwt.sign({ _id: id, role: role }, config.secrets.session, { expiresInMinutes: 60 * 5 }); }