auth/auth.service.js
/**
 * Return a jwt token signed by the app secret
 */
Return a jwt token signed by the app secret
Return a jwt token signed by the app secret
function signToken(id, role){
    return jwt.sign({_id:id, role:role},config.secrets.session,{
        expiresIn: 60*60*5
    })
}
function signToken ( id , role ) { return jwt . sign ( { _id : id , role : role } , config . secrets . session , { expiresIn : 60 * 60 * 5 } ) }
Return a jwt token signed by the app secret
Return a jwt token signed by the app secret