JsonWebToken implementation for node.js
npm install node-jsonwebtokents
import { JWT } from "node-jsonwebtoken";
interface Payload {
id: number,
name: string,
}
const jwt = new JWT('secret_key');
const token = await jwt.sign({ id: 1, name: "Alex" });
const payload = await jwt.verify(token);
``