Skip to content

Instantly share code, notes, and snippets.

View AgentDavid's full-sized avatar
🏠
Working from home

David Gimenez AgentDavid

🏠
Working from home
View GitHub Profile
@AgentDavid
AgentDavid / parse-jwt.js
Created February 19, 2021 18:31 — forked from Klerith/parse-jwt.js
Parse - JWT - Obtener Payload y fecha de creación y expiración
function parseJwt (token) {
var base64Url = token.split('.')[1];
var base64 = base64Url.replace('-', '+').replace('_', '/');
return JSON.parse(window.atob(base64));
};