function ParseJWT(token: string) { if (!token || !token.split(".")[1]) { return; } const base64Url = token.split(".")[1]; const base64 = base64Url.replace("-", "+").replace("_", "/"); return JSON.parse(window.atob(base64)); } export default ParseJWT;