flame/utils/signToken.js
2021-11-10 16:14:22 +01:00

9 lines
200 B
JavaScript

const jwt = require('jsonwebtoken');
const signToken = (expiresIn) => {
const token = jwt.sign({ app: 'flame' }, process.env.SECRET, { expiresIn });
return token;
};
module.exports = signToken;