Skip to content

Instantly share code, notes, and snippets.

View seba2305's full-sized avatar
🎯
Focusing

Sebastian Vega seba2305

🎯
Focusing
  • Santiago, Chile
View GitHub Profile
@seba2305
seba2305 / parse-jwt.js
Created April 17, 2024 15:04 — 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));
};