GoalModelEditor/BackEnd/authen.js
// generate OAuth token for a given user
generate OAuth token for a given user
generate OAuth token for a given user
function genToken(user_id) {
    let token = jwt.sign({ id: user_id }, SECRET, { expiresIn: SECONDS_VALID });
    return token;
}
function genToken ( user_id ) { let token = jwt . sign ( { id : user_id } , SECRET , { expiresIn : SECONDS_VALID } ) ; return token ; }
generate OAuth token for a given user
generate OAuth token for a given user
//console.log("token generated: " + token);