Skip to content

Instantly share code, notes, and snippets.

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

El-HobbitCR Jefh15

🏠
Working from home
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));
};