1.0.2 • Published 4 years ago

jsonwebtoken-async v1.0.2

Weekly downloads
12
License
MIT
Repository
github
Last release
4 years ago

jsonwebtoken-async

This is simply a promise wrapper of node-jsonwebtoken from Auth0. Nothing special.

Install

$ npm install jsonwebtoken-async

Getting started:

Please check out the original repo for tutorial.

Example of signing a key

const fs = require('fs');

const jwt = require('jsonwebtoken-async');
const privateKey = fs.readFileSync('./keys/private.key');
const publicKey = fs.readFileSync('./keys/public.key');

async function sign() {
    const token = await jwt.sign({ foo: 'bar' }, privateKey, {algorithm: 'RS256' });
    console.log(token);    
}

sign();
1.0.2

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago