Skip to content

Commit a46097e

Browse files
panvaMarcos Castany
authored and
Marcos Castany
committed
docs: make decode impossible to discover before verify
see #741
1 parent 15a1bc4 commit a46097e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ jwt.verify(token, getKey, options, function(err, decoded) {
231231

232232
```
233233

234+
<details>
235+
<summary><em></em>Need to peak into a JWT without verifying it? (Click to expand)</summary>
236+
234237
### jwt.decode(token [, options])
235238

236239
(Synchronous) Returns the decoded payload without verifying if the signature is valid.
@@ -259,6 +262,8 @@ console.log(decoded.header);
259262
console.log(decoded.payload)
260263
```
261264

265+
</details>
266+
262267
## Errors & Codes
263268
Possible thrown errors during verification.
264269
Error is the first argument of the verification callback.

0 commit comments

Comments
 (0)