1import jwt_decode from "jwt-decode";
2var token = "eyJ0eXAiO...";
3var decoded = jwt_decode(token);
4console.log(decoded);
5
6/* prints: * { foo: "bar", * exp: 1393286893, * iat: 1393268893 } */
1var ca = "your.jwt.token";
2var base64Url = ca.split('.')[1];
3var decodedValue = JSON.parse(window.atob(base64Url));