use jwt decode frontend code example
Example: js jwt decode
import jwt_decode from "jwt-decode";
var token = "eyJ0eXAiO...";
var decoded = jwt_decode(token);
console.log(decoded);
/* prints: * { foo: "bar", * exp: 1393286893, * iat: 1393268893 } */