import jwt from "jsonwebtoken";
import "dotenv/config";

const SECRET = process.env.JWT_SECRET;

export function generateToken(payload) {
	return jwt.sign(payload, SECRET, {expiresIn: "24h"});
}

export function verifyToken(token) {
	return jwt.verify(token, SECRET);
}
