API/api.medcify.app/helper/token.js
2022-09-26 11:41:44 +05:30

11 lines
231 B
JavaScript

//--------TOKEN GENERATOR---------------//
const jwt=require('jsonwebtoken');
const tokenGenerator=(username)=>
{
const token=jwt.sign({username},process.env.JWT_KEY);
return token;
}
module.exports.tokenGenerator=tokenGenerator