Skip to content

Instantly share code, notes, and snippets.

@ThomRoman
Created July 18, 2019 01:07
Show Gist options
  • Save ThomRoman/dcb5cc224ed1528c1003c6bab1b48121 to your computer and use it in GitHub Desktop.
Save ThomRoman/dcb5cc224ed1528c1003c6bab1b48121 to your computer and use it in GitHub Desktop.
Obtener PayLod , fecha de creación y expiración JWT
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