From 53a88ecf4494e30e1d62a1cf3cc354650349f486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20F=2E=20Romaniello?= Date: Wed, 27 Apr 2016 11:36:40 -0300 Subject: [PATCH] update readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 54db00a..1686a74 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ $ npm install jsonwebtoken ### jwt.sign(payload, secretOrPrivateKey, options, [callback]) -(Asynchronous) If a callback is supplied, callback is called with the JsonWebToken string +(Asynchronous) If a callback is supplied, callback is called with the `err` or the JWT. (Synchronous) Returns the JsonWebToken as string @@ -58,7 +58,7 @@ var cert = fs.readFileSync('private.key'); // get private key var token = jwt.sign({ foo: 'bar' }, cert, { algorithm: 'RS256'}); // sign asynchronously -jwt.sign({ foo: 'bar' }, cert, { algorithm: 'RS256' }, function(token) { +jwt.sign({ foo: 'bar' }, cert, { algorithm: 'RS256' }, function(err, token) { console.log(token); }); ```