Last active
September 19, 2017 19:59
-
-
Save mattkelley/b831e34581b4c83d7887829084e8c848 to your computer and use it in GitHub Desktop.
Mock Admin Console API valid jwt example
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
// Create a multi-part form | |
const data = new FormData() | |
// Set number of seconds till JWT should expire | |
data.append('exp', '30') | |
// Fetch the JWT | |
fetch(`${window.location.origin}/home/jwt`, { method: 'POST', body: data }) | |
.then(body => body.json()) | |
.then(jwt => console.log(jwt)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment