flame/utils/signToken.js

9 lines
200 B
JavaScript
Raw Normal View History

2021-11-10 18:14:22 +03:00
const jwt = require('jsonwebtoken');
const signToken = (expiresIn) => {
const token = jwt.sign({ app: 'flame' }, process.env.SECRET, { expiresIn });
return token;
};
module.exports = signToken;