API/api.medcify.app/helper/token.js

11 lines
231 B
JavaScript
Raw Permalink Normal View History

2022-09-26 06:11:44 +00:00
//--------TOKEN GENERATOR---------------//
const jwt=require('jsonwebtoken');
const tokenGenerator=(username)=>
{
const token=jwt.sign({username},process.env.JWT_KEY);
return token;
}
module.exports.tokenGenerator=tokenGenerator