I wanted to decode the token on the client side.
But due to dependency on joi which has no client side support, I can not use node-jsonwebtoken on the client side.
Please remove dependency on joi library to resolve this.
I used jwt-decode to accomplish my use case.
Thanks @ehartford I had this exact same problem, wanted to do a simple check to see if it's first expired before sending requests to the APIs.
Thanks @ehartford for letting us know the solution as well :)
I close the issue, be free to reopen it if needed.
Most helpful comment
I used jwt-decode to accomplish my use case.