Error differentiation
miguelaeh opened this issue · comments
Miguel Ángel Cabrera Miñagorri commented
I needed the type of error that occurred in the coding and decoding of the tokens to implement oAuth 2 so I created a module that is an extension of this and emits different errors depending on what happens, so that you can identify the error in the code in a simple way. For example, differentiate between an expired token or an invalid token.
URL: https://www.npmjs.com/package/jwt-simple-error-identify
shmilyoo commented
I agree.
in the decode method, all error raised is new Error.
please define the different error separately