Created
February 14, 2019 05:15
-
-
Save purplefeel/471c4ebdb42d53979d53fda5bffff672 to your computer and use it in GitHub Desktop.
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
parseJwt = (token: String) => { | |
var base64Url = token.split('.')[1]; | |
var 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