Skip to content

Commit 53a88ec

Browse files
committed
update readme
1 parent 3898d3f commit 53a88ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $ npm install jsonwebtoken
1515

1616
### jwt.sign(payload, secretOrPrivateKey, options, [callback])
1717

18-
(Asynchronous) If a callback is supplied, callback is called with the JsonWebToken string
18+
(Asynchronous) If a callback is supplied, callback is called with the `err` or the JWT.
1919

2020
(Synchronous) Returns the JsonWebToken as string
2121

@@ -58,7 +58,7 @@ var cert = fs.readFileSync('private.key'); // get private key
5858
var token = jwt.sign({ foo: 'bar' }, cert, { algorithm: 'RS256'});
5959

6060
// sign asynchronously
61-
jwt.sign({ foo: 'bar' }, cert, { algorithm: 'RS256' }, function(token) {
61+
jwt.sign({ foo: 'bar' }, cert, { algorithm: 'RS256' }, function(err, token) {
6262
console.log(token);
6363
});
6464
```

0 commit comments

Comments
 (0)