hokaccha / node-jwt-simple

JWT(JSON Web Token) encode and decode module for node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error differentiation

miguelaeh opened this issue · comments

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

I agree.
in the decode method, all error raised is new Error.
please define the different error separately