Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
It's too easy to skim the documentation and accidentally use `jwt.decode` instead of `jwt.verify`. This adds a warning to prevent that.
  • Loading branch information
joepie91 committed Sep 7, 2015
1 parent 6a715a1 commit 40b2aaa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ jwt.verify(token, cert, { algorithms: ['RS256'] }, function (err, payload) {

(Synchronous) Returns the decoded payload without verifying if the signature is valid.

__Warning:__ This will __not__ verify whether the signature is valid. You should __not__ use this for untrusted messages. You most likely want to use `jwt.verify` instead.

`token` is the JsonWebToken string

`options`:
Expand Down

0 comments on commit 40b2aaa

Please sign in to comment.