Skip to content

Instantly share code, notes, and snippets.

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

Milton Martinez Galindo MiltonMG

🏠
Working from home
  • El Salvador
View GitHub Profile
@Klerith
Klerith / parse-jwt.js
Created March 15, 2018 15:07
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));
};