decode jwt node.js code example
Example 1: decode jwt token nodejs
var ca = yourToken;
var base64Url = ca.split('.')[1];
var decodedValue = JSON.parse(window.atob(base64Url));
Example 2: 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 } */