I use jsonwebtoken to decode my Token to see if it has expired or not. But, the console.log return null.
var token = response.headers.authorization;
token = token.replace('Bearer','');
var jwt = require('jsonwebtoken');
var decoded = jwt.decode(token);
console.log(decoded);
I'm don't understand because my token is not null
jsonwebtokenis intended for use on the backend. For the frontend, you should usejwt-dcodewhich is developed by the same company (auth0) but is much more smaller and intended for frontend use.