const jwt = require("jsonwebtoken"); const token = jwt.sign({ userId: 123 }, "secretKey", { expiresIn: "1h" });
const token = jwt.sign({ id: user._id }, process.env.JWT_SECRET, { expiresIn: "1d" });