Created
July 18, 2019 01:07
-
-
Save ThomRoman/dcb5cc224ed1528c1003c6bab1b48121 to your computer and use it in GitHub Desktop.
Obtener PayLod , fecha de creación y expiración JWT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const parseJWT = token =>{ | |
let base64URL = token.split('.')[1] | |
let base64 = base64URL.replace('-','+').replace('_','/') | |
return JSON.parse(window.atob(base64)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment