Skip to content

Instantly share code, notes, and snippets.

View ProgramadorJunior20's full-sized avatar

Jefferson Murullo ProgramadorJunior20

View GitHub Profile
@ProgramadorJunior20
ProgramadorJunior20 / parse-jwt.js
Created March 3, 2024 14:19 — 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));
};