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);

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    1,374
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    1,374

Package Sidebar

Install

npm i node-jsonwebtoken

Weekly Downloads

1,374

Version

0.0.1

License

MIT

Unpacked Size

5.64 kB

Total Files

6

Last publish

Collaborators

  • nur840