node-jsonwebtoken
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

node-jwt

It provide a nice (api) way to use jsonwebtoken;

JWT

import { JWT } from "node-jsonwebtoken";

interface Payload {
    id: number,
    name: string,
}
const jwt = new JWT<Payload>('secret_key');

const token = await jwt.sign({ id: 1, name: "Alex" });
const payload = await jwt.verify(token);

/node-jsonwebtoken/

    Package Sidebar

    Install

    npm i node-jsonwebtoken

    Weekly Downloads

    948

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    5.64 kB

    Total Files

    6

    Last publish

    Collaborators

    • nur840