Description I am trying to use jwt-decode in a typescript project i.e. Stencil Project & it is throwing following error:
This expression is not callable.Type '{ default: (token: string, options?: Options) => TTokenDto; }' has no call signatures.
import * as jwt_decode from 'jwt-decode';
.
.
.
let token = "........";
let decoded = jwt_decode(token);
Reproduction
JWT decode only look for public part so it is totally safe to do that in your front-end code. Save this answer.
Following correction to the import statement works fine:
import jwt_decode from 'jwt-decode';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With