-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Migration Notes: v7 to v8
Here you can find some notes to help you understand how to migrate to v8 from v7:
-
JOI validation library has been removed. The errors raised for input validation on
sign
function have changed, previously we raisedValidationError
, now it is a plainError
. Error messages have also changed.- Keep in mind the new validation on objects (
options
,options.headers
and optionallypayload
) have changed a bit by using lodash. Now it is checked that those are objects, that's it, with JOI some other validations/allowances were applied.
- Keep in mind the new validation on objects (
-
Package size has been reduced. This can only affect you if you depended on some of the deleted files (non functional files).
-
process.nextTick()
execution before calling the verification callback has been removed. If you pass a callback function it will get called right away, if you expected the next tick behavior, you may want to call nextTick in your code. -
maxAge
verification option expects seconds or a string describing a time span (i.e:'2 days'
). It accepted milliseconds in v7, which did not make sense since JWTs times are expressed in seconds. -
Unintentionally removed support for Streams on payload for signing.