SyntaxFix
Write A Post
Hire A Developer
Questions
Simple function with try - catch
const parseJwt = (token) => { try { return JSON.parse(atob(token.split('.')[1])); } catch (e) { return null; } };
Thanks!