Skip to content

Instantly share code, notes, and snippets.

View wcdz's full-sized avatar
🐶
Dev :)

William Chávez Díaz wcdz

🐶
Dev :)
View GitHub Profile
@wcdz
wcdz / parse-jwt.js
Created June 23, 2022 21:23 — 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));
};