generate a jwt token secret in node js
const jwt = require('jsonwebtoken');
const jwt_secret = require('crypto').randomBytes(64).toString('hex');
// preferably store and use jwt_secret as an environment variable rather than generating it at runtime
jwt.sign({ _id: emailExist._id }, jwt_secret);