Last active
October 16, 2016 19:18
-
-
Save cognivator/cc14eb250580d9376a466304f463df68 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
// Assumes jwt-client has been loaded to define JWT global | |
(function expireJWT() { | |
JWT.defaults = {key: 'jwt', tokenPrefix: '', storage: window.localStorage, padding: false}; | |
decodedJWT = JWT.read(JWT.get()); | |
decodedJWT.claim.exp = (Date.now() / 1000) - 1; | |
JWT.keep(decodedJWT); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment