From 9584fcf547eff7d3c238a031dc297426f2a48d5d Mon Sep 17 00:00:00 2001 From: Subrat Date: Sat, 18 Nov 2023 05:30:22 +0530 Subject: [PATCH] docs: Enhance JsonWebTokenError section in README - Added descriptions for 'secretOrPrivateKey must have a value' - Added descriptions for 'secretOrPrivateKey is not valid key material' This provides clarity on two common error scenarios encountered when working with JsonWebTokenError. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4e20dd9..a39da34 100644 --- a/README.md +++ b/README.md @@ -314,6 +314,8 @@ Error object: * 'jwt issuer invalid. expected: [OPTIONS ISSUER]' * 'jwt id invalid. expected: [OPTIONS JWT ID]' * 'jwt subject invalid. expected: [OPTIONS SUBJECT]' + * 'secretOrPrivateKey must have a value' + * 'secretOrPrivateKey is not valid key material' ```js jwt.verify(token, 'shhhhh', function(err, decoded) {