Skip to content

Commit

Permalink
docs: Enhance JsonWebTokenError section in README
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
subrat0796 committed Nov 18, 2023
1 parent bc28861 commit 9584fcf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -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) {
Expand Down

0 comments on commit 9584fcf

Please sign in to comment.