From d097d30aa817e4d80e395f10f7251351c08e427c Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Fri, 4 Sep 2020 22:05:35 +0200 Subject: [PATCH] docs: make decode impossible to discover before verify see #741 --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index da35fa5..d76f879 100644 --- a/README.md +++ b/README.md @@ -231,6 +231,9 @@ jwt.verify(token, getKey, options, function(err, decoded) { ``` +
+Need to peak into a JWT without verifying it? (Click to expand) + ### jwt.decode(token [, options]) (Synchronous) Returns the decoded payload without verifying if the signature is valid. @@ -259,6 +262,8 @@ console.log(decoded.header); console.log(decoded.payload) ``` +
+ ## Errors & Codes Possible thrown errors during verification. Error is the first argument of the verification callback.