Skip to content

Commit b77041d

Browse files
committed
fixed unclear documentation and added safe recommendations
1 parent bc28861 commit b77041d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,13 @@ The header can be customized via the `options.header` object.
6666

6767
Generated jwts will include an `iat` (issued at) claim by default unless `noTimestamp` is specified. If `iat` is inserted in the payload, it will be used instead of the real timestamp for calculating other things like `exp` given a timespan in `options.expiresIn`.
6868

69+
It is recommended to store the secret key in a .env file.
70+
6971
Synchronous Sign with default (HMAC SHA256)
7072

7173
```js
7274
var jwt = require('jsonwebtoken');
73-
var token = jwt.sign({ foo: 'bar' }, 'shhhhh');
75+
var token = jwt.sign({ foo: 'bar' }, 'secretkey');
7476
```
7577

7678
Synchronous Sign with RSA SHA256

0 commit comments

Comments
 (0)